mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
010ca69864
* add functions to decode an epoch timestamp The code added here is alternative to the libc gmtime function. This function takes a unix epoch timestamp and decodes it into things like the year/day/time/etc. I looked at various libc implementations to see how it was implemented and this appears to be correct. I reorganized it so that applications can choose which data they need rather than calcualting it all in a single function. The data structures layout the order of operations required to decode various things like the year/month or time of day. * set Month.jan to 1 instead of 0 to avoid +1 in conversion to numeric * add another test * remove unnecessary comptimeMod |
||
---|---|---|
.. | ||
epoch.zig |