logoalt Hacker News

_alternator_yesterday at 3:30 PM2 repliesview on HN

Leap seconds are their own nightmare. UNIX time ignores them, btw, so that the unix epoch is 86400*number of days since 1/1/1970 + number of seconds since midnight. The behavior at the instance of a leap second is undefined.


Replies

oasisbobyesterday at 5:18 PM

That's a good way of describing that. It's far too easy to pretend UNIX timestamps would correspond to a stopwatch counting from 1/1/1970.

show 1 reply
adrianNyesterday at 4:07 PM

Undefined behavior is worse than complicated defined behavior imo.