←back to thread

283 points move-on-by | 4 comments | | HN request time: 0.097s | source
Show context
1oooqooq ◴[] No.45221029[source]
love the takes on this one blog, but "I'm copying an old conf file for over 20yrs and now got this issue" is kinda weak.

American exceptionalism time zones aren't used since the 90s. even the cpus from that time are already dropped from kernel support. heck even the text encoding is gone.

replies(1): >>45221157 #
kstrauser ◴[] No.45221157[source]
That’s unkind. I want to do the right thing in such cases, but I’m also learning about this today for the very first time. I’ve never, not once, heard that US/Pacific was a bad idea until this post. If not for this, I still wouldn’t know. I thought it and America/Los_Angeles were semantically identically and just kind of symlinks to PST8PDT or whatever.

If anything, the city TZ always felt off, like I was opting in to that specific city’s strange legal decisions or something.

replies(2): >>45221499 #>>45225808 #
1oooqooq ◴[] No.45225808[source]
> If anything, the city TZ always felt off, like I was opting in to that specific city’s strange legal decisions or something.

that is exactly what time zones are for :) not being snarky (wasn't before either, i really love that blog!). but the whole reason for tz is to join the ever changing oddities of political bodies from one very specific region.

replies(1): >>45225900 #
kstrauser ◴[] No.45225900[source]
My point there was that it feels hyperlocal to Los Angeles. Does it have some TZ law my own city in the same zone doesn’t? Hope not!

(It doesn’t, but that’s what it implies to me.)

replies(1): >>45226091 #
layer8 ◴[] No.45226091[source]
The geographic extent of legislative time zones can change, they can morph, split and merge, and also appear and vanish completely. In consequence, the only way to unambiguously specify which local time results when adding durations backwards and forwards in time, without being constrained to limited periods of legislative non-change, is to fix a specific geographical location, and to specify how local time has changed and is changing at that particular location. That is what the tz database does. In principle, you could define a separate time zone for each point on Earth, but that isn’t practical. So the compromise is to pick representative cities.

One important thing to understand is that the time zones of the tz database, and hence generally the time zones used in computing, are a slightly different concept than legislative time zones.

replies(1): >>45228379 #
1. kstrauser ◴[] No.45228379[source]
I get all that, I really do. And I know America/LA is a reasonable pick: it’s a large, well known city nearby that’s always going to be at the same time I am when I’m at home.

Still feels weird, though. What if LA specifically passes a time zone law so that now it’s sometimes wrong for everyone else in California. Do we add an America/Cali_except_LA zone?

That’s probably hypothetical. It seems unlikely. But what a major pain in the ass if it did happen?

replies(2): >>45228996 #>>45231945 #
2. arcfour ◴[] No.45228996[source]
That can happen and has. And the result is basically as you described it.

Yes, it's silly and inefficient, but so are time zones. It's not an easy problem to wrangle on a computer, for reasons that are exactly as you have described.

replies(1): >>45229680 #
3. kstrauser ◴[] No.45229680[source]
Yeah, it’s easy enough to pick at edge cases, but it’s amazing we have something that generally works this well at all. I don’t know if I have any better ideas, at least ones that the smart people maintaining the DB haven’t already considered and rejected.

It’s an inherently complex, ugly mess.

4. layer8 ◴[] No.45231945[source]
Another city would be picked to represent the rest of California, and the point is that using that city as a time zone ID would then work not only for future times, but also backwards for any times in the past. If, instead, you had America/California, or US/Pacific, those would be ambiguous either forward or backwards in time.

So the trade-off is timezones being specific to a particular city but remaining unambiguous forward and backward in time.

You can’t avoid pain when there is a change in the geographic area of a legislative time zone. But you can avoid the case of a time zone ID becoming ambiguous in terms of the UTC<—>local time mapping it’s supposed to define. The latter is the aim of the present scheme.