Debian 13, Postgres, and the US/* time zones

4 days ago (rachelbythebay.com)

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.

  • > Launchpad marked it as "This bug affects 1 person.".

    That just means no one has clicked "affects me too" button yet (after logging in).

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.

  • Not only did I not notice, I have never known that country prefixes were a thing, having to deal with tzdata since 1999. I wonder if that timezone was typed in manually? I doubt Postgres 15 file contained it to begin with.

  • > You're telling me you didn't notice ? It was...

    In a large fraction of cases in the FOSS world, it comes across that the developers really do want to communicate this sort of thing, but there's no clarity on where or how they should do so. See for example various deprecations in Python packaging tools (and standards).

    • In this case, they did communicate it, and the aforegiven Vogon reference is a mischaracterization. The naming convention is in the current IANA doco and Eggert copy.

      * https://data.iana.org/time-zones/tz-link.html#tzdb

      * https://web.cs.ucla.edu/~eggert/tz/tz-link.htm#tzdb

      Paul Eggert explained the continent/ocean plus largest city naming convention on a WWW page almost a quarter of a century ago. The WWW page was so well publicized that you can find its URL baked into at least four of the O'Reilly animal-cover books from the early 2000s.

      * https://web.archive.org/web/20011023074744/http://www.twinsu...

      It was explained on Usenet and on mailing lists prior to that.

      7 replies →

    • Then you get the reverse. I just upgraded to macOS Sonoma (yes I'm always one major version behind with Apple stuff...), and I was annoyed as heck when I had to click through "Look what's new in Calendar!", "Look what's new in Reminders!", "Look what's new in StripClubs!"... I need to use my software right now, I will not read this. Then I will forget it ever popped up, and will not read it in the future either.

      3 replies →

  • Why are time-zones even prefixed by continent? Country-prefixed time-zones make more sense because they're defined politically.

    • Cities may find themselves in other countries easier than on other continents.

    • In addition to what others have said, there are several examples where people disagree about which country a city is “rightfully” in.

      Nobody can really find fault with Asia/Jerusalem, whereas either Israel/Jerusalem or Palestine/Jerusalem would be controversial.

> 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.

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...

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`.

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.

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

  • I work with a development team who manages data integration and migration for massive datasets, and they have sensibly set a standard that every date/time value they store in their databases will be UTC.

    But they explicitly or implicitly have also decided not to store the timezone in the strings, so every single value is technically ambiguous. Absolutely drives me crazy.

    Update: since there have been questions, these are strings, not native datetime values.

    • Even if you stored the timezone, the values are technically ambiguous. Even when you are using globally unique timezone identifiers like 'America/New_York' instead of 'EST' and its several meanings. A timestamp such as '2025-09-13 13:00 America/New_York' could end up referring to a different instant next week due to a correction in the timezone database. Unlikely for this sort of problem to happen and need correcting in major timezones, but it has happened for less popular and historical timezones. The way for them to be non-ambiguous, representing an unchangable instant in time, is to store the timestamp converted to a timezone that will never have retroactive changes and has no daylight savings time transitions, such as UTC. At which point, storing the timezone identifier is redundant (and violates the principle of not allowing illegal values to be represented if you follow that).

      1 reply →

    • In many systems it is reasonable not to include a zone. Usually that goes hand-in-hand with the desire to use a more compact representation, such as storing a numerical timestamp with a customary interpretation (usually UTC or TAI). If you must store a string, you may as well include a zone. Using ambiguously-zoned timestamps is an invitation for bugs. I feel your pain.

    • > they have sensibly set a standard that every date/time value they store in their databases will be UTC.

      Not sensible at all for future date/times.

  • I work for a company with servers, employees, and customers in basically every time zone around the world. And yet every server, internal tool, and workflow uses Pacific time. UTC is used precisely nowhere. Setting aside the issues of DST, I imagine it's convenient for the employees and managers in HQ but absolute madness for everyone else.

  • It also makes sense. Timezone is user specific - if you have users from all over the globe, they will need different settings, so this should be set in frontend.

  • You can also run in UTC+$YOUR_OFFSET timezone if you don't use DST.

    On the other hand, UTCx timezones are not silver bullets if your fleet is a part of a multi-continent federation.

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.

  • You’re not wrong in general terms, but tzdata is fairly well essential, a default component, and a dependency for unpteen things in the ecosystem. Of course a line must be drawn somewhere, but this really is a “major” caveat.

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

  • That’s one of the normal Continent/City time zones, not one of the weird Country/ZoneName ones that have been deprecated for ages. “America” here refers to the continent or continents[0], not the USA.

    0: Note that different cultures disagree on whether there are two continents called North America and South America, or one continent called America.

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

  • Agreed.

    > 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.

    I get this, but now you get to laugh and dust yourself off. If it had silently started doing the wrong thing, that would be a worthy complaint.

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`...)

  • > the folks who run the tz db definitely know what they're doing

    It's one guy. He demonstrably does NOT know what he's doing.

    > I always prefer `US/Eastern`

    As you should. It's the actual name of the timezone as published by the entity that defines it. Outside of the goofy definitions in the tz file it's what everyone living _inside_ of that timezone would call it and see it referenced as.

    To call this "backwards" is an absolute insult to civil time keeping and drives me insane.

    > doesn't that make more sense?

    I always thought it should be served through DNS. Then each country can just define it's own TZ record type and embed it at the root of their country code domain and could expand on it however they like.

    eastern.timezone.us

    Also, since domain names have punycode for internationalization, you could actually call timezones in countries like Mexico what they're actually named for end users.

    • This is a fantastic idea.

      You could use this to promulgate SRV records that direct you to a country’s authoritative time servers, too.

  • If New-York shifts its timezone, then it will still be New-York and America. And the new tzdata will reflect that shift so your data will always be correct (as in reflecting the time it is in new york). For local time, you will switch to a new city and the date will still be correct.

    • Exactly, but that is my point: usually my data is not intended to reflect the time it is in New York. Being tied to a (semi-)arbitrary city changes the actual meaning of the zone slightly. If every city was represented and I could choose "Boston" then that would make sense (for data is intended to reflect the time it is in Boston) but of course that's not entirely practical.

      (I'll note that I agree with the general wisdom to store data in UTC; here when I talk about zones I'm either talking about user local machine time or display)

  • FWIW if Boston switches, it won’t be America/Puerto_Rico, it’ll get a new zone name (probably America/Boston). Tzdb zones express that everywhere in that zone has always been on the same time, since the advent of standard timekeeping, so they always fracture when some subset moves to a different zone.

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…

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

    And off-by-one errors. The two most difficult things in software engineering: naming things, timestamps, and off-by-one errors.

  • Some times cannot be expressed in UTC.

    For example: “this meeting will take place at 10 AM on July 31st, 2026, US Pacific time” cannot be expressed in UTC. You can guess what time UTC that refers to, and you’ll probably be right, but you’ll be wrong if it turns out for example that the US abolishes DST before that date.

> 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??

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.

  • This has nothing to do with ISO 3166 at all. The tzdata database is the work of a single person, Arthur Olson, not a committee (or rather it was, from its birth in the 1980s until 2011 when a company decided to sue him for no reason).

    And for most of its life it’s been an explicit policy that timezones are named by continent and representative population center, not by country, to avoid entangling it in territorial disputes and improve naming stability for historical data. The US/* (and Canada/*, etc.) names are deprecated and have been since 1995 (?), but apparently people were still using them because the deprecation wasn’t really apparent unless one was especially into reading release notes.

  • All the legacy time zones were moved out of the default zoneinfo install. It’s not a us-specific issue but the legacy US/ timezones remain in widespread use, and they stop working on Debian 13 ootb (possibly Ubuntu noble as well?).

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

[flagged]

  • The timezone names are defined by the Olson database, not Debian. It is the only sensible system in our ecosystem. It certainly beats Outlook which still wrongly insists that my timezone is GMT just because I live in the UK and still confuses everyone (it isn't during the summer; we use BST over the summer, not GMT).

    • > It is the only sensible system in our ecosystem. It certainly beats Outlook which still wrongly insists that my timezone is GMT just because I live in the UK and still confuses everyone (it isn't during the summer; we use BST over the summer, not GMT).

      I went to both Outlook and Teams to check and I have the option to select both "(UTC) Universal Coordinated Time" and "(UTC+0) Dublin, Edinburgh, Lisbon, London", with the later adapting to changes in the summer; but I do agree it's clunkier than the Olson database, combining multiple regions in a single option while splitting regions with the same timezone rules into different ones.

      6 replies →

    • Any moderately reasonable system would be backwards compatible and/or migrate existing values

      > 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.

      6 replies →

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.

  • 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.

    • > 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.

      6 replies →

    • For general user interfaces, it's for the user interface to show "US Pacific" or "UK" rather than America/Los_Angeles and Europe/London.

      The timezone selector in KDE shows "Los Angeles | America/United States of America | Pacific" and "London | Europe/United Kingdom", for example.

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.

  • > For example, they patch OpenSSH source code in a way that...

    Isn't it the same thing with the RedHat downstreams ? (Not necessarily OpenSSH but other packages)

    IIRC RedHat do all sorts of things to keep their gov / corp customers happy, also usually in the name of backwards compatability, all of which then end up in the downstreams.

  • Russ Allbery left over bureaucracy and systemd. It sounds like it's chocked full of people who want power and an excuse to patch downstream to create a cottage industry of quirks, busywork, and codependency.

    I prefer real choice and light patches that try to upstream as much as possible, or workaround upstream obstinacy rather than create incompatible idiosyncrasies. One area that isn't well represented in barely a/no distro is init freedom neither married to nor completely divorced from the sprawling octopus.