[Bug 2096974] Re: tzdata-2024b-0ubuntu0.24.04 makes std::chrono unusable
Launchpad Bug Tracker
2096974 at bugs.launchpad.net
Wed Feb 5 17:11:04 UTC 2025
This bug was fixed in the package tzdata - 2024b-0ubuntu0.24.04.1
---------------
tzdata (2024b-0ubuntu0.24.04.1) noble; urgency=medium
* Revert using %z in tzdata.zi data form (LP: #2096974):
- Enable link to link feature also for rearguard dataform
- Use dataform rearguard for C++ std::chrono
- Add chrono autopkgtest to test C++ std::chrono::tzdb parser
-- Benjamin Drung <bdrung at ubuntu.com> Thu, 30 Jan 2025 22:33:14 +0100
** Changed in: tzdata (Ubuntu Noble)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to tzdata in Ubuntu.
https://bugs.launchpad.net/bugs/2096974
Title:
tzdata-2024b-0ubuntu0.24.04 makes std::chrono unusable
Status in gcc-14 package in Ubuntu:
Confirmed
Status in tzdata package in Ubuntu:
Triaged
Status in waybar package in Ubuntu:
New
Status in gcc-14 source package in Focal:
New
Status in tzdata source package in Focal:
New
Status in waybar source package in Focal:
New
Status in gcc-14 source package in Jammy:
New
Status in tzdata source package in Jammy:
New
Status in waybar source package in Jammy:
New
Status in gcc-14 source package in Noble:
New
Status in tzdata source package in Noble:
Fix Released
Status in waybar source package in Noble:
New
Status in gcc-14 source package in Oracular:
New
Status in tzdata source package in Oracular:
Fix Released
Status in waybar source package in Oracular:
New
Bug description:
[ Impact ]
The latest tzdata SRU[1] included a change[2] in the main data form:
The main source files' time zone abbreviations now use %z,
supported by zic since release 2015f and used in vanguard form
since release 2022b. For example, America/Sao_Paulo now contains
the zone continuation line "-3:00 Brazil %z", which is less error
prone than the old "-3:00 Brazil -03/-02". This does not change
the represented data: the generated TZif files are unchanged.
Rearguard form still avoids %z, to support obsolescent parsers.
Turns out the standard c++ library in at least oracular and noble fail
to parse that, resulting in a much small list of available timezones,
or even crashes[3].
The c++ fix for that is in [4]. That might be eventually SRUed, but at
the moment it's quicker to adjust tzdata than the c++ library. Also,
there might be other parsers in the supported Ubuntu releases that are
also affected, and just haven't been noticed yet.
1. https://launchpad.net/bugs/2070285
2. https://github.com/eggert/tz/commit/94e6b3b0eb773e66a9ac49b905c69c0fa6a31dc3
3. https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/2096974/comments/10
4. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116657
[ Test Plan ]
This update includes a new DEP8 test that checks specifically for this
bug. Therefore, the test plan is to observe that the full suite of
autopkgtests is run and that it passed.
Manual testing specifically for this bug is also accepted, with the
C++ example provided:
"""
inalling tzdata in version 2024b-0ubuntu0.24.04 causes std::chrono to deliver only 2 timezones:
code:
for (const auto & time_zone : std::chrono::get_tzdb().zones)
{
std::cout << time_zone.name() << std::endl;
}
output:
Etc/GMT
Etc/UTC
"""
The output should include all timezones.
[ Where problems could occur ]
All software that use tzdata could be affected by this update. There
is probably at least one implementation in each programming language
for reading the timezone data. The update could trigger parser bugs.
The autopkgtest will cover Python's zoneinfo and now C++ std::chrono.
[ Original Description ]
inalling tzdata in version 2024b-0ubuntu0.24.04 causes std::chrono to
deliver only 2 timezones:
code:
for (const auto & time_zone : std::chrono::get_tzdb().zones)
{
std::cout << time_zone.name() << std::endl;
}
output:
Etc/GMT
Etc/UTC
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-14/+bug/2096974/+subscriptions
More information about the foundations-bugs
mailing list