A while back I blogged a collection of “Falsehoods programmers believe about …“. One of those things was time. Today I came across a nice addition to that – “Falsehoods programmers believe about Unix time“.
These three facts all seem eminently sensible and reasonable, right?
1. Unix time is the number of seconds since 1 January 1970 00:00:00 UTC
2. If I wait exactly one second, Unix time advances by exactly one second
3. Unix time can never go backwards
False, false, false.
All three of these are false and for the same reason – leap seconds. The article provides a nice and easy explanation of how and why that happens.