by nulagrithom · 7y ago · 0 comments
> If I wait exactly one second, Unix time advances by exactly one second
How does UTC jumping around affect this? If a leap second is removed it doesn't mean you've waited 0 seconds.
I feel like this is wrong too:
> If there’s a leap second in a day, Unix time either repeats or omits a second as appropriate to make them match.
It's not Unix time doing that. It's UTC.
Im pretty sure the second graph is mislabeled (the UTC second after 23:59:60 should be 00:00:00), but Unix time takes 23:59:60 to mean the same as 00:00:00. So 23:59:60.5 is also the same as 00:00:00.5, and so on. If you parsed the Unix time into a readable timestamp, it would tell you it's the first second of the next day for two seconds.
No, but it means UNIX time does not advance by exactly one second per elapsed second. Instead it advances by either 0 or 2.
> It's not Unix time doing that. It's UTC.
It's also unix time. unix time is (86400 * days_since_epoch + seconds_since_midnight). A leap second means a day is not 86400 seconds, and thus you'll either get a skip or a repeat on midnight rollover.
The OP did not make this claim. He said that waiting 1s does not necessarily increase the Unix time by one second - not the other way around.
Or how my highschool math teacher put it: Every time it rains, the street gets wet. But not every time the street is wet, it rained - maybe my dog just took a leak....