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

If you're using the Olsen Database[0], aren't past (and future) changes all handled properly?

[0] https://en.wikipedia.org/wiki/Tz_database

See: Example zone and rule lines



I suppose storing the offset is safer, because you have in a single string all you need to know to convert the time to UTC, but yes, that was my thought as well -- given a non-broken copy of tzdata, historical dates should be correctly convertible if all you have is a date/time and a timezone name.


Storing the offset won't work for future dates due to daylight savings changes.


True, but who cares? We're not talking about future dates, we're talking about recording a current timestamp, at which time we of course know the time zone and whether or not DST is in effect at that current point.




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

Search: