Tuesday, May 28, 2019

Unix Time Falsehoods

"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.

But it’s unsatisfying to say “this is false” without explaining why, so I’ll explain that below...