Debian 13, Postgres, and the US time zones

rachelbythebay.com

269 points by move-on-by a day ago


JdeBP - a day ago

This does not trace things back far enough. The root is where IANA has long since segregated out a set of timezone file names into a "backward" collection:

* https://data.iana.org/time-zones/tzdb/backward

If one traces references, one finds this connected bug on Launchpad. Amusingly to anyone who has ever seen these sweeping timezone database changes over the years, Launchpad marked it as "This bug affects 1 person.".

* https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/200807...

The rules for the "backward" file are here:

* https://data.iana.org/time-zones/theory.html#naming

All of the US/* timezone names, such as US/Pacific here, have been backwards compatibility measures in place for the whole of the 21st century and some of the late 20th. The Olson database in the 1980s (mod.sources v08i085, comp.sources.unix v14i030) used these names. But the naming scheme changed somewhen in the 1990s to a continent/city and ocean/city form and backwards compatibility with the old names has been preserved ever since by the "backward" file.

* https://groups.google.com/g/comp.unix.solaris/c/ON_MPZxVdv0/...

Debian has moved into a non-depended-upon package a backwards compatibility measure that is as old as Debian itself.

yellers - a day ago

Hang on a second, "(...) in 2023. US/* was moved to tzdata-legacy (...)"

US/* was moved to 'backward' (the file for backward compatibility) in the tz database in 1993(!) and as such was essentially marked as deprecated long enough. https://data.iana.org/time-zones/tzdb/backward

You're telling me you didn't notice ? It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard.

roelschroeven - a day ago

> The worst part about this is that it didn't get so much as a mention in the Debian 13 release notes. I read through that document before going for it and never encountered it. Indeed, even now, you won't find "tzdata" or "zone" in it.

I had another issue during my upgrade to Debian 13 that also wasn't mentioned in the release notes. I filed a bug report, but I was told that the issue was not important enough to put in the release notes, and I should have instead more closely read NEWS.Debian of the package. So I don't really know anymore what the "Issues to be aware of" chapter in the release notes is for, because apparently it's only a small selection of issues you need to be aware of.

Tepix - a day ago

Pro tip: Use the command

    timedatectl list-timezones
to get a list of all timezones your debian based OS recognises.

For your convenience, here is a list for a Debian 13 box with 628 entries:

https://pastes.io/output-of-timedatectl-list-timezones-on-de...

acdha - a day ago

I ran into a similar bug in Git Lab where the v18 upgrade didn’t replace now-unsupported time zones so things like scheduled pipelines simply stopped running and were labeled inactive in the UI without explanation.

https://gitlab.com/gitlab-org/gitlab/-/issues/556779#note_26...

The fix is simply to change them to the non-backwards linked names but it caused some confusing API errors since data which would no longer pass validation was already in the database and didn’t look wrong.

evdubs - a day ago

I also ran into this using:

- Debian 13

- Interactive Brokers' Trader Workstation

- Racket's `gregor` date and time library

IBKR still sends the old, deprecated US/* timezones. As noted in the article, the solution is to `apt install tzdata-legacy`.

nona - 17 hours ago

This is why Debian users should use apt-listchanges to display the latest NEWS.Debian items on upgrade.

I wouldn't expect to see all the important news of the tens of thousands of packages I don't have installed in the release notes.

I was hit by this using unstable (before they made a NEWS item), but when upgrading my stable machines to trixie I got a proper warning/reminder of this specific thing.

op00to - 21 hours ago

I feel like I’ve been using America/New_York for a decade at least. Am I misremembering?

poemxo - a day ago

I don't get how this is a snag, it's right there in the log.

nja - 19 hours ago

I'm still not totally sure why these names were deprecated in the first place...

I mean, the folks who run the tz db definitely know what they're doing, it just never 100% clicked with my thinking.

I always prefer `US/Eastern` over `America/New_York` -- it seems more "canonical" to me. New York is _currently_ the anchor city for ET, but will it always be? The place I live (Boston) is currently on ET, but in the future it might be on Atlantic Time. If there was an `America/Boston`, I would use that to be safe, but since there isn't, it just seems better to be to be specific that I mean "Eastern Time" and not "whatever the time is in NYC"... At least then if Boston switches to a different tz, I could intentionally switch to "Atlantic Time" -- doesn't that make more sense? Versus I guess what I'd have to do, which is switch to `America/Puerto_Rico`? (I had to actually search that one, too bad there's no `US/Atlantic`...)

burnt-resistor - a day ago

Always run production systems in the Etc/UTC timezone. This eliminates an entire class of problems while only creating minor inconveniences.

liampulles - 19 hours ago

tz-announce is a nice mailing list to subscribe to, useful info and fascinating.

https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/...

reactordev - 21 hours ago

Ooofff. The two difficult things in software engineering, naming, and timestamps.

This hit me in the early 2000s and now everything I do is in UTC. All dates, timestamps, everything, UTC. If you want to look at a local window in time, convert the window to a utc start and end date and search. When viewing, use a js function to translate the utc date to a local one to print. The mental gymnasium of local to utc to local again…

raziel2p - a day ago

> At the time, I went "WTF?" and just commented it out to get it running again. I had bigger fish to fry... and just kind of forgot about it. Everything seemed fine.

You're running a database system and you just casually comment out the configuration setting the timezone?

In what way did everything "seem fine"? SELECT 1 returned something? No further investigation required??

ggm - a day ago

Is there a problem with ISO3166 denoted information in general or is there a specific US issue here? I would think ISO code denoted tzdata was a public good in some sense.

loloquwowndueo - a day ago

Imagine my outrage when America/Montreal was deprecated years ago. “It’s the same as America/Toronto, just use that” they said :)

donalhunt - a day ago

What sort of monster are you by not defaulting to UTC on systems? (⊙_⊙') /s

raverbashing - a day ago

[flagged]

1oooqooq - a day ago

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.

pfexec - a day ago

Debian is known to have made similar monstrously stupid decisions.

For example, they patch OpenSSH source code in a way that makes defaults behave differently than upstream. In the name of backwards compatibility of course.

I assume this will continue until it doesn't anymore, and the only notification you shall receive from the ivory tower is a cryptic one-liner buried in a changelog somewhere.