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

> why not include the timezone in the timestamp?

I don't think there is an unambiguous way to represent time zones. Time zones are a creation of law and convention. They change, and have changed, over time.



Events in the past are easy: all you really need is UTC time, but if you store local time and the offset from UTC (and optionally the tzdata timezone name) that works too.

For dates in the future, you need to store local time, the timezone name, and the calculated offset for that time. When the database changes, you need to check if the offset changes, and if so, think hard about what that means. Also, some future events are more appropriately scheduled for local time wherever the person happens to be, which is tricky too.


Yes there is. It's called ISO 8601.

https://en.m.wikipedia.org/wiki/ISO_8601


There is an unambiguous way to represent time zones:

UTC±hh:mm


To be pedantic, that's the unambiguous way to represent the UTC offset, not timezones. Different timezones can have the same offset at some moments, but not at others.


GGP probably meant including the UTC offsets in the timestamps, not timezone names like "Europe/Berlin" or whatever.


Right, but the time zone might not have the same offset in the future, they're not interchangeable.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: