** Changed in: systemd (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to tzdata in Ubuntu. https://bugs.launchpad.net/bugs/2030684
Title: tzname[1] empty after tzset() with env TZ="UTC" Status in django-mailman3 package in Ubuntu: New Status in php8.2 package in Ubuntu: Triaged Status in postgresql-15 package in Ubuntu: Fix Committed Status in python-django package in Ubuntu: New Status in systemd package in Ubuntu: Invalid Status in tzdata package in Ubuntu: Fix Committed Status in tzdata package in Debian: Unknown Bug description: The following program prints different output when run with tzdata 2023c-7ubuntu1 from mantic, versus tzdata 2023c-8ubuntu1 from mantic- proposed: root@mantic:~# cat bug.c #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> int main(void) { int r; r = setenv("TZ", ":UTC", 1); if (r < 0) { printf("Failed to set TZ env var: %s\n", strerror(errno)); return 1; } tzset(); printf("timezone = %lu, daylight = %d\n", timezone, daylight); printf("tzname[0] = %s, tzname[1] = %s\n", tzname[0], tzname[1]); } root@mantic:~# gcc bug.c root@mantic:~# ./a.out timezone = 0, daylight = 0 tzname[0] = UTC, tzname[1] = UTC root@mantic:~# apt-cache policy tzdata tzdata: Installed: 2023c-7ubuntu1 Candidate: 2023c-7ubuntu1 Version table: *** 2023c-7ubuntu1 500 500 http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages 100 /var/lib/dpkg/status If I install tzdata from mantic-proposed, I get different output: root@mantic:~# vi /etc/apt/sources.list root@mantic:~# apt update && apt install tzdata Hit:1 http://archive.ubuntu.com/ubuntu mantic InRelease Hit:2 http://security.ubuntu.com/ubuntu mantic-security InRelease Get:3 http://archive.ubuntu.com/ubuntu mantic-proposed InRelease [118 kB] Hit:4 http://archive.ubuntu.com/ubuntu mantic-updates InRelease Hit:5 http://archive.ubuntu.com/ubuntu mantic-backports InRelease Get:6 http://archive.ubuntu.com/ubuntu mantic-proposed/main amd64 Packages [35.9 kB] Get:7 http://archive.ubuntu.com/ubuntu mantic-proposed/main Translation-en [14.8 kB] Get:8 http://archive.ubuntu.com/ubuntu mantic-proposed/main amd64 DEP-11 Metadata [2376 B] Get:9 http://archive.ubuntu.com/ubuntu mantic-proposed/main amd64 c-n-f Metadata [1004 B] Get:10 http://archive.ubuntu.com/ubuntu mantic-proposed/restricted amd64 Packages [15.9 kB] Get:11 http://archive.ubuntu.com/ubuntu mantic-proposed/restricted Translation-en [3564 B] Get:12 http://archive.ubuntu.com/ubuntu mantic-proposed/restricted amd64 c-n-f Metadata [336 B] Fetched 192 kB in 1s (324 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 72 packages can be upgraded. Run 'apt list --upgradable' to see them. root@mantic:~# apt install tzdata=2023c-8ubuntu1 Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: libefiboot1 libefivar1 Use 'apt autoremove' to remove them. The following packages will be upgraded: tzdata 1 upgraded, 0 newly installed, 0 to remove and 72 not upgraded. Need to get 269 kB of archives. After this operation, 142 kB disk space will be freed. Get:1 http://archive.ubuntu.com/ubuntu mantic-proposed/main amd64 tzdata all 2023c-8ubuntu1 [269 kB] Fetched 269 kB in 0s (867 kB/s) Preconfiguring packages ... (Reading database ... 39935 files and directories currently installed.) Preparing to unpack .../tzdata_2023c-8ubuntu1_all.deb ... Unpacking tzdata (2023c-8ubuntu1) over (2023c-7ubuntu1) ... Setting up tzdata (2023c-8ubuntu1) ... Current default time zone: 'Etc/UTC' Local time is now: Mon Aug 7 21:18:35 UTC 2023. Universal Time is now: Mon Aug 7 21:18:35 UTC 2023. Run 'dpkg-reconfigure tzdata' if you wish to change it. Scanning processes... Scanning candidates... Restarting services... Service restarts being deferred: systemctl restart systemd-logind.service systemctl restart unattended-upgrades.service No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. root@mantic:~# ./a.out timezone = 0, daylight = 0 tzname[0] = UTC, tzname[1] = root@mantic:~# apt-cache policy tzdata-legacy tzdata-legacy: Installed: (none) Candidate: 2023c-7ubuntu1 Version table: 2023c-8ubuntu1 100 100 http://archive.ubuntu.com/ubuntu mantic-proposed/main amd64 Packages 2023c-7ubuntu1 500 500 http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages In particular, note that tzname[1] (the name of the daylight zone) is empty, whereas it previously printed "UTC". To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/django-mailman3/+bug/2030684/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp