3 ms·
No thank you. Just store times on computers as $epoch+$offset and then convert to UTC when displayed to the user. That way, only the display routine has to car
by LeoPanthera 11y ago
No thank you. Just store times on computers as $epoch+$offset and then convert to UTC when displayed to the user.
That way, only the display routine has to care about leap seconds and it won't break anything.
- repsilat 11y agoIf you mean "UNIX time", you'll be disappointed -- UNIX time is not the number of seconds since the epoch, it is also leap-second adjusted. It stops when a leap second happens to make sure there are exactly 86400 UNIX seconds between every midnight (so you can do divmod calculations on timestamps.) Maybe you were suggesting an improvement to UNIX time, though, in which case I think the grandparent and I would get behind your proposal.
- LeoPanthera 11y agoYeah I know about unix time and that isn't what I meant. It never made sense to me. Just have a monotonic timer and an epoch, and worry about UTC and leap seconds in the view.