Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Naw that would make way too much sense. Instead, unix time ticks backwards 1 second to sync up with UTC:

Doesn't that mean that UNIX time is in fact a stopwatch, but to express it in UTC you need to factor in UTC's quirks such as its leap seconds?



No. Like I said, that would make way too much sense.

The hardware RTC on your motherboard is a stopwatch. When a leap second occurs, your system time will be set 1 second backwards which is also 1 second less than what the RTC reports. Then, the new fuckered time will be written to the RTC so it stops acting as a stopwatch and instead tracks unix time.

An application that reads the system unix time 4 times a second (using a monotonic clock for the 250ms delay) and prints it will observe a negative duration in unix time as seen in my previous comment.

> to express it in UTC you need to factor in UTC's quirks such as its leap seconds

Oh that would make unix time so much more useful. But no, the UTC quirk is incorporated into unix time the instant a leap second happen as if some nutjob logged into all your servers and changed each clock manually.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: