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

I agree with the timestamp argument for storage but you might also want to keep the timezone/locale along.

Operation like "1 day from this timestamp" is locale-dependent. And SECONDS_PER_DAY is not a constant.



SECONDS_PER_DAY is constant for human scale activities. People who fret over leap seconds are either overly pedantic about time or are working at high enough precision that they aren't going to be making crude adjustments like "plus 1 month from now".

Besides, I can practically guarantee that the libraries discussed here don't deal with leap seconds. They're going to get it just as wrong.


> SECONDS_PER_DAY is constant for human scale activities.

Except for Daylight savings time, which adds or subtracts a whole hour to the day.




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

Search: