[Bug 2096974] Re: tzdata-2024b-0ubuntu0.24.04 makes std::chrono unusable
Andreas Hasenack
2096974 at bugs.launchpad.net
Fri Jan 31 13:03:39 UTC 2025
** Description changed:
[ Impact ]
+ The latest tzdata SRU[1] included a change[2] in the main data form:
- * An explanation of the effects of the bug on users and justification
- for backporting the fix to the stable release.
+ 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.
- * In addition, it is helpful, but not required, to include an
- explanation of how the upload fixes this bug.
+
+ 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 ]
- * Think about what the upload changes in the software. Imagine the
- change is wrong or breaks something else: how would this show up?
-
- * It is assumed that any SRU candidate patch is well-tested before
- upload and has a low overall risk of regression, but it's important
- to make the effort to think about what ''could'' happen in the event
- of a regression.
-
- * This must never be "None" or "Low", or entirely an argument as to why
- your upload is low risk.
-
- * This both shows the SRU team that the risks have been considered,
- and provides guidance to testers in regression-testing the SRU.
+ TBD
[ Other Info ]
- * Anything else you think is useful to include
-
- * Make sure to explain any deviation from the norm, to save the SRU
- reviewer from having to infer your reasoning, possibly incorrectly.
- This should also help reduce review iterations, particularly when the
- reason for the deviation is not obvious.
-
- * Anticipate questions from users, SRU, +1 maintenance, security teams
- and the Technical Board and address these questions in advance
+ TBD
[ 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
** Also affects: tzdata (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: waybar (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: gcc-14 (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: tzdata (Ubuntu Jammy)
Importance: Undecided
Status: New
** Also affects: waybar (Ubuntu Jammy)
Importance: Undecided
Status: New
** Also affects: gcc-14 (Ubuntu Jammy)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-14 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 Committed
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 Committed
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 ]
TBD
[ Other Info ]
TBD
[ 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