| author | |
| committer | |
| log | 708414aaf4d88157153cf413137d2cb3c106c3b4 |
| tree | d1f9acfd41531b90737a0fd5c714743fe181861f |
| parent | 8e91c229e1538a32532f69d96c162d81f6ea771a |
2 files changed, 2 insertions(+), 3 deletions(-)
lib/compiler/aro/aro/Compilation.zig-1| ... | @@ -217,7 +217,6 @@ fn generateDateAndTime(w: anytype, timestamp: u47) !void { | ... | @@ -217,7 +217,6 @@ fn generateDateAndTime(w: anytype, timestamp: u47) !void { |
| 217 | }); | 217 | }); |
| 218 | 218 | ||
| 219 | const day_names = [_][]const u8{ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; | 219 | const day_names = [_][]const u8{ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; |
| 220 | // days since Thu Oct 1 1970 | ||
| 221 | const day_name = day_names[@intCast((epoch_day.day + 3) % 7)]; | 220 | const day_name = day_names[@intCast((epoch_day.day + 3) % 7)]; |
| 222 | try w.print("#define __TIMESTAMP__ \"{s} {s} {d: >2} {d:0>2}:{d:0>2}:{d:0>2} {d}\"\n", .{ | 221 | try w.print("#define __TIMESTAMP__ \"{s} {s} {d: >2} {d:0>2}:{d:0>2}:{d:0>2} {d}\"\n", .{ |
| 223 | day_name, | 222 | day_name, |
lib/std/time/epoch.zig+2-2| ... | @@ -133,7 +133,7 @@ pub const MonthAndDay = struct { | ... | @@ -133,7 +133,7 @@ pub const MonthAndDay = struct { |
| 133 | day_index: u5, // days into the month (0 to 30) | 133 | day_index: u5, // days into the month (0 to 30) |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | // days since epoch Oct 1, 1970 | 136 | /// days since epoch Jan 1, 1970 |
| 137 | pub const EpochDay = struct { | 137 | pub const EpochDay = struct { |
| 138 | day: u47, // u47 = u64 - u17 (because day = sec(u64) / secs_per_day(u17) | 138 | day: u47, // u47 = u64 - u17 (because day = sec(u64) / secs_per_day(u17) |
| 139 | pub fn calculateYearDay(self: EpochDay) YearAndDay { | 139 | pub fn calculateYearDay(self: EpochDay) YearAndDay { |
| ... | @@ -168,7 +168,7 @@ pub const DaySeconds = struct { | ... | @@ -168,7 +168,7 @@ pub const DaySeconds = struct { |
| 168 | } | 168 | } |
| 169 | }; | 169 | }; |
| 170 | 170 | ||
| 171 | /// seconds since epoch Oct 1, 1970 at 12:00 AM | 171 | /// seconds since epoch Jan 1, 1970 at 12:00 AM |
| 172 | pub const EpochSeconds = struct { | 172 | pub const EpochSeconds = struct { |
| 173 | secs: u64, | 173 | secs: u64, |
| 174 | 174 |