fix(timestamp): log without undefined values (0xAA)
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
This commit is contained in:
@@ -58,7 +58,7 @@ fn log_timestamp(writer: anytype) void {
|
|||||||
const curtime = c_time.time(null);
|
const curtime = c_time.time(null);
|
||||||
const tm = c_time.localtime(&curtime);
|
const tm = c_time.localtime(&curtime);
|
||||||
|
|
||||||
var buffer: [32]u8 = undefined;
|
var buffer: [16]u8 = undefined;
|
||||||
_ = c_time.strftime(@ptrCast(&buffer), 32, "%F %R", tm);
|
_ = c_time.strftime(@ptrCast(&buffer), 32, "%F %R", tm);
|
||||||
writer.print("[{s}] ", .{buffer}) catch return;
|
writer.print("[{s}] ", .{buffer}) catch return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user