| author | |
| committer | |
| log | 6947fa581e7fdb447e06d1a0444af3a60d38f5d1 |
| tree | 1e4a33ba6e0a2530143d11e60a6b3325297195a6 |
| parent | f9a433b782d15b6526af2faf3e222eb4efe7f6cd |
1 files changed, 4 insertions(+), 0 deletions(-)
time.zig+4| ... | ... | @@ -19,6 +19,10 @@ pub const DateTime = struct { |
| 19 | 19 | return unix_epoch.addMs(unix); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | pub fn initUnix(unix: u64) Self { | |
| 23 | return unix_epoch.addSecs(unix); | |
| 24 | } | |
| 25 | ||
| 22 | 26 | /// Caller asserts that this is > epoch |
| 23 | 27 | pub fn init(year: u16, month: u16, day: u16, hr: u16, min: u16, sec: u16) Self { |
| 24 | 28 | return unix_epoch |