timezone changed unexpectedly from EST to America/Adak or America/Indiana/Indianapolis

Bug #2055718 reported by Andreas Hasenack
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tzdata (Ubuntu)
Fix Released
High
Unassigned
Focal
Fix Committed
Undecided
Unassigned
Jammy
Fix Committed
Undecided
Unassigned
Mantic
Fix Committed
Undecided
Unassigned

Bug Description

[ Impact ]

On every tzdata package upgrade the configured timezone might be updated to an incorrect one.

I enhanced debian/test_timezone_conversions to detect those inconsistencies and fixed everything that was found by this check. The SRUs contain a backport of the script from noble.

[ Test Plan ]

debian/test_timezone_conversions is enhanced to check the timezone conversions for consistency to prevent such kind of issues in the future. debian/test_timezone_conversions is run during built and as autopkgtest.

In addition, manual check can be done. The following test should stay at `EST` (and not update to `America/Adak`):

```
ln -sf /usr/share/zoneinfo/EST /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata
ls -alh /etc/localtime
```

`US/East-Indiana` should be updated to `America/Indiana/Indianapolis` and not to `America/Adak`:

```
ln -sf /usr/share/zoneinfo/US/East-Indiana /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata
```

`America/Louisville` should be updated to `America/Kentucky/Louisville` and not to `America/Adak`:

```
ln -sf /usr/share/zoneinfo/America/Louisville /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata
```

[ Other Info ]

The autopkgtest for chrony is flaky on jammy and newer (see bug #2002910).

[ Regression potential ]

The patch ziguard.awk-Move-link-to-link-feature-from-vanguard-to-ma.patch moves the link to link feature from vanguard to main dataform to produce correct symlinks. This results in symlinks that can point to symlinks. The zic from glibc that we use can handle that, but there might be other parsers that read /usr/share/zoneinfo/tzdata.zi directly and could fail to handle symlinks to symlinks.

[ Original report ]

A user reported this regression on https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/2052739:

UPDATE: I don't think it's a regression anymore, see comment #5

"""
Hello.
After automatic upgrade of tzdata from 2023c-0ubuntu0.22.04.2 to 2024a-0ubuntu0.22.04
the previously set EST time zone was automatically changed to "America/Adak" or "America/Indiana/Indianapolis" on all our servers (50+).
Look like a bug in tzdata configure script.
"""

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I did a quick test in a jammy VM, and didn't observe this change:

ubuntu@j:~$ date
Fri Mar 1 13:29:18 EST 2024

ubuntu@j:~$ dpkg -l tzdata
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-====================-============-=======================================
ii tzdata 2023d-0ubuntu0.22.04 all time zone and daylight-saving time data

(update in another terminal)

ubuntu@j:~$ date
Fri Mar 1 13:30:12 EST 2024

ubuntu@j:~$ dpkg -l tzdata
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-====================-============-=======================================
ii tzdata 2024a-0ubuntu0.22.04 all time zone and daylight-saving time data
ubuntu@j:~$

Changed in tzdata (Ubuntu):
status: New → Incomplete
Revision history for this message
Vladimir (larrabee112) wrote :

Hello.
Thanks for quick response.
I can to reproduce the issue on fresh VM. Steps:

1. Run ubuntu server 22.04 live CD.
2. Set timezone: timedatectl --set-timezone EST
3. Check current date:
>> date
XXX EST
4. Update tzdata: apt update && apt install tzdata
5. Check current date:
>> date
XXX HST

Thanks.

Revision history for this message
Vladimir (larrabee112) wrote :

Screenshot 1

Revision history for this message
Vladimir (larrabee112) wrote :

Screenshot 2

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

That happens also with the current version of tzdata.

Starting with:

$ dpkg -l tzdata|grep tzdata
ii tzdata 2022a-0ubuntu1 all

$ date
Mon Mar 4 12:22:38 UTC 2024

# the current timezone (UTC) was configured via dpkg-reconfigure tzdata

$ sudo apt reinstall tzdata=2022a-0ubuntu1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 342 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 tzdata all 2022a-0ubuntu1 [342 kB]
Fetched 342 kB in 0s (11.1 MB/s)
Preconfiguring packages ...
(Reading database ... 31964 files and directories currently installed.)
Preparing to unpack .../tzdata_2022a-0ubuntu1_all.deb ...
Unpacking tzdata (2022a-0ubuntu1) over (2022a-0ubuntu1) ...
Setting up tzdata (2022a-0ubuntu1) ...

Current default time zone: 'Etc/UTC'
Local time is now: Mon Mar 4 12:22:55 UTC 2024.
Universal Time is now: Mon Mar 4 12:22:55 UTC 2024.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Timezone is kept, as expected.

Now I set it via timedatectl:
ubuntu@j-tz:~$ sudo timedatectl set-timezone EST
ubuntu@j-tz:~$ date
Mon Mar 4 07:23:42 EST 2024

Reinstall same tzdata:
$ sudo apt reinstall tzdata=2022a-0ubuntu1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 342 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 tzdata all 2022a-0ubuntu1 [342 kB]
Fetched 342 kB in 0s (14.6 MB/s)
Preconfiguring packages ...
(Reading database ... 31964 files and directories currently installed.)
Preparing to unpack .../tzdata_2022a-0ubuntu1_all.deb ...
Unpacking tzdata (2022a-0ubuntu1) over (2022a-0ubuntu1) ...
Setting up tzdata (2022a-0ubuntu1) ...

Current default time zone: 'America/Adak'
Local time is now: Mon Mar 4 02:23:57 HST 2024.
Universal Time is now: Mon Mar 4 12:23:57 UTC 2024.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

And we get America/Adak:
$ date
Mon Mar 4 02:24:08 HST 2024

So I don't think it's a regression, and am updating the tags accordingly.

tags: removed: regression-update
Changed in tzdata (Ubuntu):
status: Incomplete → Confirmed
summary: - Regression after update: timezone changed unexpectedly
+ timezone changed unexpectedly
description: updated
Benjamin Drung (bdrung)
summary: - timezone changed unexpectedly
+ timezone changed unexpectedly from EST to America/Adak
Revision history for this message
Benjamin Drung (bdrung) wrote : Re: timezone changed unexpectedly from EST to America/Adak

The test case can be distilled down to:

```
ln -sf /usr/share/zoneinfo/EST /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata
```

On Ubuntu 22.04 (jammy) convert_timezone() in tzdata.config maps EST to America/Indianapolis which is a symlink to America/Indiana/Indianapolis. Bug 1: America/Indianapolis is not an option in debconf and therefore the first geographic area "Adak" is used.

Possible bug 2: convert_timezone() in tzdata.config maps EST to America/Indiana/Indianapolis, but EST is not a symlink to America/Indiana/Indianapolis. If I saw that correctly, EST does not take daylight saving into account.

summary: - timezone changed unexpectedly from EST to America/Adak
+ timezone changed unexpectedly from EST to America/Adak or
+ America/Indiana/Indianapolis
Changed in tzdata (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Benjamin Drung (bdrung) wrote :

Commit eee799c9b97512f29eb5854ff965dbad79424242 ("Get rid of old SystemV timezones, as this has been fully removed upstream. Convert existing configuration to the "new" America/* names.") changed the mapping of EST from SystemV/EST5 to America/Indianapolis in 2020b-1. Therefore Ubuntu 20.04 "jammy" and newer are affected.

Vladimir, would updating EST to America/Indiana/Indianapolis be okay?

Revision history for this message
Vladimir (larrabee112) wrote :

Hello.
Unfortunately, these are completely different time zones.
1. As i see America/Indiana/Indianapolis has DST.
2. Time zones tied to a location can change their time zone according to the decision of the authorities.
For use cases on servers, these are quite significant differences.

From my point of view, the script should not automatically convert common timezones (UTC, EST, GMT+0, Greenwich, ...) into geographic ones.
But we can ask the user in interactive tui if he wants to perform such a conversion.

Benjamin Drung (bdrung)
tags: added: foundations-todo
Vladimir (larrabee112)
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Benjamin Drung (bdrung) wrote :
Benjamin Drung (bdrung)
Changed in tzdata (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Benjamin Drung (bdrung) wrote :

Debdiff for mantic.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Here is the debdiff for jammy. debian/test_timezone_conversions found even more inconsistencies in jammy:

ERROR: Following 4 timezones cannot be selected, but are not converted:
America/Fort_Wayne
America/Indianapolis
America/Knox_IN
America/Louisville
ERROR: Following 3 timezones are conversion targets, but are not available:
Asia/Riyadh87
Asia/Riyadh88
Asia/Riyadh89
ERROR: Following 4 timezones are conversion targets, but are not selectable:
America/Indianapolis
Asia/Riyadh87
Asia/Riyadh88
Asia/Riyadh89
ERROR: Following 1 timezones are converted, but they do not match their symlink targets:
US/Indiana-Starke

Revision history for this message
Benjamin Drung (bdrung) wrote :

The debdiff for focal is similar to the debdiff for jammy. Only debian/test_timezone_conversions needed some modification to work with the older Python version.

Benjamin Drung (bdrung)
description: updated
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tzdata - 2024a-2ubuntu1

---------------
tzdata (2024a-2ubuntu1) noble; urgency=medium

  * Merge with Debian unstable. Remaining changes:
    - Ship 2024a ICU timezone data which are utilized by PHP in tzdata-icu
    - Add autopkgtest test case for ICU timezone data
    - Do not rename NEWS into changelog.gz, this fixes a build failure on
      moment-timezone.js
    - Point Vcs-Browser/Git to Launchpad
    - generate_debconf_templates: Work around AttributeError on icu import

tzdata (2024a-2) unstable; urgency=medium

  * Update Italian debconf translation.
    Thanks to Ceppo <email address hidden> (Closes: #1063490)
  * Replace America/Godthab by America/Nuuk
  * Do not replace CET, CST6CDT, EET, EST*, HST, MET, MST*, PST8PDT, WET.
    The replacements differed in using daylight saving. (LP: #2055718)
  * Fix updating US/Indiana-Starke to America/Indiana/Knox
  * Allow ziguard.awk to generate timezone symlink that point to symlinks
    to fix (at least) the timezone symlinks Africa/Asmera,
    Antarctica/South_Pole, Iceland, Pacific/Ponape, and Pacific/Truk.
  * test_timezone_conversions: Check symlink targets

 -- Benjamin Drung <email address hidden> Fri, 05 Apr 2024 22:32:21 +0200

Changed in tzdata (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Proposed package upload rejected

An upload of tzdata to mantic-proposed has been rejected from the upload queue for the following reason: "to be reuploaded with better patch".

Revision history for this message
Benjamin Drung (bdrung) wrote :

Second iteration of the SRU patches to include the fix from bug #2062522

Revision history for this message
Benjamin Drung (bdrung) wrote :

Third iteration of the SRU patches to include the final and working fix from bug #2062522

Revision history for this message
Benjamin Drung (bdrung) wrote :

Debdiff for jammy.

Revision history for this message
Benjamin Drung (bdrung) wrote :

And debdiff for focal.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted tzdata into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/tzdata/2024a-0ubuntu0.23.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in tzdata (Ubuntu Mantic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-mantic
Changed in tzdata (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Andreas, or anyone else affected,

Accepted tzdata into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/tzdata/2024a-0ubuntu0.22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in tzdata (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Andreas, or anyone else affected,

Accepted tzdata into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/tzdata/2024a-0ubuntu0.20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (tzdata/2024a-0ubuntu0.20.04.1)

All autopkgtests for the newly accepted tzdata (2024a-0ubuntu0.20.04.1) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

gnustep-base/1.26.0-7 (armhf)
mtail/unknown (armhf)
tzdata/unknown (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#tzdata

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (tzdata/2024a-0ubuntu0.22.04.1)

All autopkgtests for the newly accepted tzdata (2024a-0ubuntu0.22.04.1) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

chrony/unknown (armhf)
libical3/3.0.14-1build1 (armhf)
postgresql-14/unknown (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#tzdata

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (tzdata/2024a-0ubuntu0.23.10.1)

All autopkgtests for the newly accepted tzdata (2024a-0ubuntu0.23.10.1) for mantic have finished running.
The following regressions have been reported in tests triggered by the package:

chrony/4.3-2ubuntu1 (armhf)
howardhinnant-date/unknown (armhf)
mtail/unknown (armhf)
pandas/1.5.3+dfsg-6 (armhf)
php8.2/8.2.10-2ubuntu2.1 (armhf)
php8.2/unknown (s390x)
prometheus-alertmanager/0.25.0+ds-1 (arm64, armhf)
systemd/253.5-1ubuntu6.1 (armhf)
systemd/unknown (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/mantic/update_excuses.html#tzdata

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.