From 140815cca4ab08fc1f8f5636bda0c595c0f21f44 Mon Sep 17 00:00:00 2001 From: 3011357 <3011357@stud.hs-mannheim.de> Date: Sat, 26 Oct 2024 22:29:41 +0200 Subject: [PATCH] Added printTimestamp function in "HH:MM" format --- Testat-Planer.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Testat-Planer.zig b/Testat-Planer.zig index a6cd36a..6861dac 100644 --- a/Testat-Planer.zig +++ b/Testat-Planer.zig @@ -37,7 +37,7 @@ pub fn main () !void { // Printet timestamp im Format HH:MM pub fn printTimestamp(ts: *Timestamp) !void { - try writer.print("{d}:{d}", ts.*); +try writer.print("{0d:0>2}:{1d:0>2}", .{ ts.hours, ts.minutes }); } pub fn printPlan() !void {