tzdata update keeps changing my timezone

Bug #772024 reported by pi-rho
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tzdata (Debian)
Fix Released
Unknown
tzdata (Ubuntu)
Fix Released
Low
Unassigned
Bionic
New
Undecided
Unassigned
Focal
New
Undecided
Unassigned
Jammy
New
Undecided
Unassigned

Bug Description

[ Impact ]

Users can select some time zones in debconf that the tzdata debconf script will replace on the next run. See "Original report" for more explanation. Either those time zones should not be selectable in debconf or they should not be replaced.

[ Test Plan ]

Select US/Central as time zone and run dpkg-reconfigure:

```
sudo ln -sf /usr/share/zoneinfo/US/Central /etc/localtime
echo "US/Central" | sudo tee /etc/timezone
sudo dpkg-reconfigure -fnoninteractive tzdata
```

The output of dpkg-reconfigure should say that the current default time zone is still US/Central.

Besides this manual test, test_timezone_conversions is backported to check that there are no timezones which can be selected, but will be converted.

[ Where problems could occur ]

Besides added tests, the debconf part of tzdata is touched and could cause issues. The change does not touch the actual timezones.

[ Original report ]

Other than the fact that Chicago, Illinois is in US Central Timezone, I have no relationship to Chicago. I am not in Chicago. I do not want to be in Chicago. I am in the Central Timezone. I am physically closer to other cities mentioned in tzdata. Selecting America/Chicago versus US/Central is not easier for me nor is it more intuitive. I understand that the upstream tzdata package goes a long way in documenting all of the weirdness associated with timezones and different localities' treatment of timezones and daylight "savings" time. However, from an end-user perspective, the distribution should place no special importance or preference on one timezone specification or another. Likewise, if a user chooses a timezone, the system should never change it.

To reproduce the issue:

# Manually select US/Central
me@ubuntu:~$ sudo dpkg-reconfigure tzdata
[sudo] password for me:

Current default time zone: 'US/Central'
Local time is now: Wed Apr 27 16:05:02 CDT 2011.
Universal Time is now: Wed Apr 27 21:05:02 UTC 2011.

# Validation that selection was accepted
me@ubuntu:~$ cat /etc/timezone
US/Central

me@ubuntu:~$ md5sum /etc/localtime /usr/share/zoneinfo/US/Central
6540624294b1193e22ed7a15692f2de7 /etc/localtime
6540624294b1193e22ed7a15692f2de7 /usr/share/zoneinfo/US/Central

me@ubuntu:~$ debconf-show tzdata
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
  tzdata/Zones/Australia:
* tzdata/Zones/US: Central
  tzdata/Zones/Asia:
* tzdata/Zones/Etc: UTC
  tzdata/Zones/SystemV:
  tzdata/Zones/Arctic:
  tzdata/Zones/Pacific:
  tzdata/Zones/Antarctica:
  tzdata/Zones/Europe:
  tzdata/Zones/Africa:
* tzdata/Zones/America: Chicago
* tzdata/Areas: US
  tzdata/Zones/Atlantic:
  tzdata/Zones/Indian:

# Force the package to reinstall
me@ubuntu:~$ aptitude reinstall tzdata
The following packages will be REINSTALLED:
  tzdata
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/658 kB of archives. After unpacking 0 B will be used.
Preconfiguring packages ...
(Reading database ... 168356 files and directories currently installed.)
Preparing to replace tzdata 2011g-0ubuntu0.11.04 (using .../tzdata_2011g-0ubuntu0.11.04_all.deb) ...
Unpacking replacement tzdata ...
Setting up tzdata (2011g-0ubuntu0.11.04) ...

Current default time zone: 'America/Chicago'
Local time is now: Wed Apr 27 16:05:22 CDT 2011.
Universal Time is now: Wed Apr 27 21:05:22 UTC 2011.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

# Now previous indicators are reset to America/Chicago instead of US/Central

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: tzdata 2011g-0ubuntu0.11.04
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Wed Apr 27 15:54:33 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US:en
SourcePackage: tzdata
UpgradeStatus: Upgraded to natty on 2011-04-10 (17 days ago)

Related branches

Revision history for this message
pi-rho (pi-rho) wrote :
Revision history for this message
pi-rho (pi-rho) wrote :

Same behavior: tzdata_2011g-0ubuntu0.11.04_all.deb

Revision history for this message
Prayag Narula (prayag) wrote :

Same behavior: 2011g-0ubuntu0.10.04_all.deb
Also, it breaks my system clock which keeps jumping to 2 hours ahead.

Changed in tzdata (Debian):
status: Unknown → New
Revision history for this message
Micah Gersten (micahg) wrote :

Thank you for your bug report. This bug has been upstreamed to Debian. You can track it and make comments at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603809
Please report any other issues you may find.

Changed in tzdata (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Shelby Cain (alyandon) wrote :

Is there any way we could see about having this package patched by an Ubuntu maintainer?

Based on reading over the open bugs associated with tzdata on Debian's bug tracker, this report and several other reports for the same undesirable behavior have languished from anywhere from 6 months to several years without a single response from the maintainer(s).

I don't know if that indicates a lack of concern about the issue or that the package itself isn't being actively maintained beyond database updates but in either case it seems to me that a user shouldn't have to constantly reset /etc/timezone in order to prevent it from being updated to a technically correct although undesirable value.

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

Tested on Ubuntu 22.04 (jammy) and 23.04 (lunar) and the issue is still there:

```
apt install -y tzdata
echo "US/Central" > /etc/timezone
ln -sf /usr/share/zoneinfo/US/Central /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata
```

The dpkg-reconfigure says "Current default time zone: 'America/Chicago'".

Benjamin Drung (bdrung)
Changed in tzdata (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tzdata - 2022g-2ubuntu1

---------------
tzdata (2022g-2ubuntu1) lunar; urgency=medium

  * Merge with Debian unstable. Remaining changes:
    - Ship ICU 2022g timezone data files which are utilized by PHP
    - Do not rename NEWS into changelog.gz, this fixes a build failure on
      moment-timezone.js
    - Point Vcs-Browser/Git to Launchpad

tzdata (2022g-2) unstable; urgency=medium

  [ Benjamin Drung ]
  * Update Czech debconf translation.
    Thanks to Miroslav Kuře <email address hidden> (Closes: #1027862)
  * Update Korean debconf translation.
    Thanks to Changwoo Ryu <email address hidden> (Closes: #1027983)
  * d/tzdata.config: Update Mideast/Riyadh8[789] to Asia/Riyadh
  * Address shellcheck complaints in postinst and tzdata.config
  * d/tzdata.config: Rename Pacific/Enderbury to Pacific/Kanton
  * Replace obsolete two-level American timezones by three-level timezones
  * Translate area "America" as "Americas" in English
    (Closes: #508118, LP: #599466)

  [ Aurelien Jarno ]
  * Update Spanish debconf translation.
    Thanks to Jonatan Porras <email address hidden>
  * Update Polish debconf translation.
    Thanks to Łukasz Dulny <email address hidden>
  * Update French debconf translation.
    Thanks to Baptiste Jammet <email address hidden>
  * Update Hebrew debconf translation.
    Thanks to Omer Zak <email address hidden>
  * Update Swedish debconf translation.
    Thanks to Luna Jernberg <email address hidden>
  * Drop wrong conversion of the Pacific/Enderbury timezone

  [ Benjamin Drung ]
  * d/rules: Exclude obsolete Uzhgorod and Zaporozhye from debconf
  * Generate debconf templates with Python
  * Drop obsolete tzconfig command (use "dpkg-reconfigure tzdata" instead)
  * Do not update US/* timezones to their America/* counterparts
    (Closes: #688318, LP: #772024)
  * Fix German translation of "Indian" to "Indischer Ozean"

 -- Benjamin Drung <email address hidden> Tue, 10 Jan 2023 23:50:27 +0100

Changed in tzdata (Ubuntu):
status: Fix Committed → Fix Released
Benjamin Drung (bdrung)
Changed in tzdata (Debian):
status: New → Unknown
Changed in tzdata (Debian):
status: Unknown → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :
Benjamin Drung (bdrung)
description: updated
Revision history for this message
Benjamin Drung (bdrung) wrote :

Found more inconsistencies introduced by pre-1970 timezones. I will attach a set of v2 debdiffs to address those as well.

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

The bionic SRU does not need a v2, because it does not have the pre-1970 timezone fix.

Benjamin Drung (bdrung)
Changed in tzdata (Ubuntu Kinetic):
status: New → Won't Fix
no longer affects: tzdata (Ubuntu Kinetic)
Revision history for this message
Benjamin Drung (bdrung) wrote :

I need to update the SRU patches to include the fix for bug #2062522.

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.