3 ms·
UNIX time ignores leap seconds, so every day is exactly 86400 seconds, and every year is either 365*86400 or 366*86400 seconds. This makes converting from yyyy-
by Kwpolska 2y ago
UNIX time ignores leap seconds, so every day is exactly 86400 seconds, and every year is either 365*86400 or 366*86400 seconds. This makes converting from yyyy-mm-dd to UNIX time quite easy, as you can just do `365*86400*(yyyy-1970) + leap_years*86400` to get to yyyy-01-01.
- XorNot 2y agoWell yes, in the sense that not all Unix epoch seconds are equally long...
- sylware 2y agoYeap, this is why I said it is kind of easy. Until you know properly the leap years. Leap year rules on the long run are are bit funky. Just have a look at wikipedia. (do not use gogol search since they are now forcing javascript by default)