Thread: Ubuntu 24.04 Time Zone Issue?
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
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
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
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
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 withThis 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
sudo apt install tzdata-legacy
After installing, Postgres correctly recognized things like "US/Pacific" and "Asia/Saigon" again.
Many thanks,
Creston
On Mon, Sep 16, 2024 at 12:22 AM Bradford Boyle <bradford.d.boyle@gmail.com> wrote:
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
Re: Creston Jamison > After installing, Postgres correctly recognized things like "US/Pacific" > and "Asia/Saigon" again. 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