Hacker News new | ask | show | jobs
by shafte 2897 days ago
As I said: UTC is a reasonable choice, except for the fact that most of your employees do not live in UTC and doing mental translation is annoying.
2 comments

Store UTC, convert on display to any timezone, either automatically based on geolocation or using a stored preference. This is application design 101 at this point.

Converting old logs isn't hard either since ISO timestamp formats include timezones, or just pick a date for the switchover. The only scenario that gets tricky is with scheduling where users expect local times that carry over daylight-savings boundaries, but it doesn't apply to most apps.

Who is doing mental translation and why? We have computers for a reason. Are we talking about logs, software applications? Storage should be in UTC, data can be converted for display. I agree that logs can be a bit annoying when they are in UTC, but at least you have a consistent value across all servers, and you know what the offset is.

Also, if your office happens to be in a timezone which observes DST, you are still screwed. Now you think your times are in localtime, but in fact they are offset by one hour. This can lead to very "fun" debugging sessions and time wasted.

It can be a minor annoyance, but you know what can be an even greater annoyance? Undoing a bad decision which has percolated across several data stores.

> Storage should be in UTC, data can be converted for display

Sometimes we need to speak about events (verbally), or share screenshots of graphs, dashboards, or other data. We can make a habit of always stating the time zone when we talk, and make sure every dashboard/graph contains a time offset.

Or we can just pick a single arbitrary time zone and always use that.

There are a few internal tools at Google that assume your local time zone (I'm in EDT) -- those are far more confusing.

> Also, if your office happens to be in a timezone which observes DST, you are still screwed.

Has this really been a problem? A date+time is unambiguous. I can only see this being confusing if California follows through with abolishing DST.

>> Or we can just pick a single arbitrary time zone and always use that.

...so pick UTC then?

Why is that any different than how it is right now for anyone not in the Pacific timezone?