diff --git a/Testat-Planer.zig b/Testat-Planer.zig index a05f54a..0e4864e 100644 --- a/Testat-Planer.zig +++ b/Testat-Planer.zig @@ -1,5 +1,5 @@ const std = @import("std"); -const writer = std.io.getStdOut().writer(); //rausnehmen +const writer = std.io.getStdOut().writer(); const Timestamp = struct { @@ -55,10 +55,11 @@ pub fn addMinutesToTimestamp(ts: *Timestamp, min: u16) !void{ if ((addMinutes + ts.minutes) >= 60){ addMinutes = (addMinutes + ts.minutes)%60; addHours += 1; + ts.minutes = 0; } ts.hours += addHours; - ts.hours += addMinutes; + ts.minutes += addMinutes; }