Live data from Hacker News

Timezone Bullshit

blog.wesleyac.com

331–334 of 334 posts

Re: Timezone Bullshit

#331

Earlier quoted context omitted.

The problem is that the GMT time for a future event is unknowable . Timezones change based on the whims of governments. They change rarely, but they do change. Your calendar can store the GMT time for lookups but it will need to recalculate this if the timezone data changes. Furthermore it isn't as simple as "storing GMT" for repeating events. As the offset will be different for different occurrences. So you need to…

As far as I’m aware, GMT has never changed since the advent of computing. Yes, you do need to store the location of the scheduler so that you can adjust everything as appropriate, and of course you need to schedule the time the event was created. But you still only store those times in GMT. By the way, what I’m describing is the way every AWS system does it. Edit : Oddly, I can’t reply to your reply to this, but I al…

The problem isn't that GMT changes, it is that the local time changes.

If I schedule an event in 1 year at 08:00 in MyCityTimezone and you store that the event occurs at 13:00 GMT then 3 months later MyCity decides that they aren't doing Daylight Savings Anymore your GMT time is now wrong. My event must still occur at 08:00 which is now 14:00 (or whatever) GMT.

"Just" storing it in GMT isn't enough. You probably do want to do that but you need to store the local time as well and update GMT to match if timezones change.

This is very frequently done wrong because timezones don't change often so the "Just store GMT" mostly works. But if you are writing a high quality system you need to deal with these cases.

Re: Timezone Bullshit

#332
post #70
post #36

Earlier quoted context omitted.

> If you ask for output in EDT, but the date is in December (which is not part of daylight savings time) then should the date output be UTC-4 or UTC-5? EST is always UTC-4 and EDT is always UTC-5. Both of these exist throughout the year. The only change happening in Spring/Autumn is that some places change which time zone they currently observe. This also addresses the second problem that you outlined. As long as the…

To be pedantic EST and EDT are offsets. America/New_York is the timezone which consists of multiple offsets that depends on the time of year and date mostly determined by the local civil authority. For example in 2005, the US extended daylight saving time by four weeks. This difference between 2004 and 2006 is a part of the timezone.

Cool, I hadn't realized that distinction in terminology. Thanks for pointing it out! :)

Re: Timezone Bullshit

#333
post #47

Earlier quoted context omitted.

Golf courses. Well, okay, this is my wonderful father's half serious answer that I love to retell. The basic idea is that it's easier to convince everyone that is actually 5:00pm and time to leave work than it is to convince just your boss that you want to start work an hour earlier and leave and hour earlier. This problem is then applied to politicians and other powerful people, who want to go golfing after work. If…

I like DST and I'm neither rich nor a politician. I could be wrong, but I think farmers in general would be pro DST.

Farmers are the most hurt by it.

Farmers need to work on daylight. They can't change their schedule when the clocks change. So during half the year, the busy half, all the business start closing down an hour early.

Re: Timezone Bullshit

#334
post #239

Is there a way to know which timezone (e.g. America/Phoenix) I'm in right now? I did actually missed a meeting due to that. I was in small city in Montana, checked list of these timezones, but didn't know which one to choose. So I saw Phoenix has the same time as me, and set it at my device. However, turned out that Montana actually uses America/Denver (which is Colorado) as their timezone. Is there a way to know tha…

the general rule of thumb for American Timezones is that Arizona is its own special thing and as long as you stay out of that state then you're in America/{los_angeles|denver|chicago|new_york} for pacific, mountain, central, and eastern respectively. Just stay away from Arizona and American time zones are easy and what you did would work. Arizona is special because it's in mountain time, it doesn't observer daylight…

Thank you. What about the rest of the Earth?
Post reply on HN