Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Arguably it's worse if 00:33 on 2024.12.26 has to get run through another function to get the true value of 2024.12.25 T 23:59.

The problem is leap seconds. Software just wasn't designed to handle 86401 seconds in a day, and caused incidents at Google, Cloudflare, Quantus, and others. Worried that resolving all possible bugs related to days with 86401 seconds in them was going to be impossible to get right, Google decided to smear that leap second so that the last "second" isn't.

And if you've not seen it, there's the falsehoods programmers believe about time article.



But that's not the case... the random-looking very-large value X has to go through a conversion function to get the true value of 2024.12.25 T 23:59, just like every other value. Surely nobody is just dividing the Unix time by 86400 like people keep suggesting? What kind of a hack would think they could do date math themselves?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: