Subject: Ubuntu 24.04 Time Zone Issue?

From: Creston Jamison <[email-masked]>
Date: Sat, 14 Sep 2024 11:16:17 -0400

A few months ago, I installed Ubuntu 24.04 on a local system and then
installed PostgreSQL 16 following the manual installation method using apt.
Everything installed successfully. However, recently, when trying to work
with time zones, I am receiving an error:

postgres=# select now() at time zone 'Asia/Saigon';
ERROR:  time zone "Asia/Saigon" not recognized

I do not get this error on any Ubuntu 22.04 install I tested.

I tried an AWS EC2 instance of Ubuntu 24.04 and this query works
successfully.
I tried a Hetzner server of Ubuntu 24.04 and it does not work.

Could there be some package dependency that is missing on Ubuntu 24.04 for
time zone support? I am not quite sure of the next steps to take.

Here is the /var/log/apt/history.log from the install on Hetzner

Start-Date: 2024-09-14  14:42:31
Commandline: apt -y install postgresql-16
Install: libtypes-serialiser-perl:amd64 (1.01-1, automatic), ssl-cert:amd64
(1.1.2ubuntu1, automatic), postgresql-16:amd64 (16.4-1.pgdg24.04+1),
libjson-perl:amd64 (4.10000-1, automatic), postgresql-client-16:amd64
(16.4-1.pgdg24.04+1, automatic), libcommon-sense-perl:amd64 (3.75-3build3,
automatic), libllvm17t64:amd64 (1:17.0.6-9ubuntu1, automatic),
postgresql-common:amd64 (262.pgdg24.04+1, automatic),
postgresql-client-commo
n:amd64 (262.pgdg24.04+1, automatic), libjson-xs-perl:amd64 (4.030-2build3,
automatic), libpq5:amd64 (16.4-1.pgdg24.04+1, automatic)
End-Date: 2024-09-14  14:42:43

Many thanks,
Creston

---

From: Bradford Boyle <[email-masked]>
Date: Sun, 15 Sep 2024 21:22:22 -0700

Hi Creston,

It looks like older versions of the tzdata package included a link
from Asia/Saigon to Asia/Ho_Chi_Minh. The link is present in
2024a-0ubuntu0.22.04.1 (Jammy) but has been removed in
2024a-3ubuntu1.1 (Noble).

-- Bradford

---

From: Creston Jamison <[email-masked]>
Date: Mon, 16 Sep 2024 14:46:50 -0400

Thanks! I dug into this a bit more as other time zones like "US/Pacific"
were also affected.

This appears related to this Ubuntu 24.04 change:
https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#tzdata-package-split

It looks like Ubuntu 24.04 no longer includes "legacy" time zones by
default. However, I was able to add them back by installing the
tzdata-legacy package with

sudo apt install tzdata-legacy

After installing, Postgres correctly recognized things like "US/Pacific"
and "Asia/Saigon" again.

Many thanks,
Creston

---

From: Christoph Berg <[email-masked]>
Date: Mon, 16 Sep 2024 22:36:54 +0200

Re: Creston Jamison
> After installing, Postgres correctly recognized things like "US/Pacific"

Yeah I'm not sure the split makes much sense. Initially, they had also
removed the "UTC" time zone from the main tzdata package which meant
that kind of everyone had to install tzdata-legacy anyway. Now it's
only half of the world :-/

Christoph