Hacker News new | past | comments | ask | show | jobs | submit login

When would you want use something else than UTC for business logic? Time zones (and their related nonsense) should be a view-layer concern.



Because there actually are times that are specified in terms of local time and are not fixed to a specific timezone. Take a birthday, for a trivial example: The span of time in UTC that corresponds to someone's birthday depends on their location at the time.


true that anniversaries are not fixed to timezone, but these are not timestamps, and generally not even dates. Just recurrences specified by month, day (or maybe time of day eg Armistice Day observed at 11:00am).

Better example: Typically an events schedule should specify destination timezone when registering an event, so that if regulations on local timezone change, scheduled event times remain valid.


For an example of how storing a UTC datetime for a future event can go wrong, see my comment:

https://news.ycombinator.com/item?id=12988092


Perhaps because there's not always a one to one relation between a time with zone and a unix time stamp.




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

Search: