Viewing:
const std = @import("std"); const time = @cImport({ @cInclude("time.h"); }); const width = 12; pub fn main() !void { const stdout = std.io.getStdOut().writer(); const ts = std.time.timestamp(); const localtime = time.localtime(&ts); var formatted: [width]u8 = undefined; _ = time.strftime(&formatted, width, "%H%M %a %d", localtime); try stdout.print("{s}\n", .{formatted}); }