Skip to content

Comment on Designing a REST API: Unix Time vs. ISO-8601 (2013)parent

Comments

Unix timestamp assumes there are exactly 86400 seconds in a day. Or, in other words, if your timestamp is a multiple of 86400, it's midnight UTC.

There are not alway 86400s in 1 day. Midnight is not a whole number of multiples of 86400 after Jan 1st 1970.

There are not alway 86400s in 1 day. Midnight is not a whole number of multiples of 86400 after Jan 1st 1970.

Isn't that an issue with the format you want to convert UNIX time to ?

I mean, UNIX time is quite clearly and unambiguously defined as the number of seconds that passed since January 1st 1970. How are UTC's leap seconds any relevant?

I mean, UNIX time is quite clearly and unambiguously defined as the number of seconds that passed since January 1st 1970.

It's not though. Unix time is not monotonic. It goes backwards sometimes.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.