authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-05-16 11:19:26 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-05-16 11:19:26 -07:00
log47337055a7bdc2ef03698fb147b59a1dcc473cee
tree49d6e58c395d3a4ea2be1d8e29286e2afc08a395
parent8b1216b2ddaf9fbab12d5b686f142f0c99d472d1

fix recursion in toUnix and enable test case


2 files changed, 2 insertions(+), 2 deletions(-)

main.zig+1-1
...@@ -118,6 +118,6 @@ comptime {...@@ -118,6 +118,6 @@ comptime {
118 .{ "ZZ", "+0000" },118 .{ "ZZ", "+0000" },
119119
120 .{ "x", "1144509852789" },120 .{ "x", "1144509852789" },
121 // .{ "X", "1144509852" },121 .{ "X", "1144509852" },
122 });122 });
123}123}
time.zig+1-1
...@@ -194,7 +194,7 @@ pub const DateTime = struct {...@@ -194,7 +194,7 @@ pub const DateTime = struct {
194 }194 }
195195
196 pub fn toUnix(self: Self) u64 {196 pub fn toUnix(self: Self) u64 {
197 const x = self.toUnix();197 const x = self.toUnixMilli();
198 return x / 1000;198 return x / 1000;
199 }199 }
200200