https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116657
Bug ID: 116657
Summary: tzdata 2024b causing timezone parsing issues in
std::chrono
Product: gcc
Version: 14.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: toolybird at tuta dot io
Target Milestone: ---
Hi, it seems latest tzdata-2024b is causing some apps to misbehave. This
reproducer (shamelessly borrowed from
https://github.com/llvm/llvm-project/issues/107779) demonstrates the issue:
#include <chrono>
#include <iostream>
int main() {
std::cout << std::chrono::get_tzdb().current_zone()->name() << "\n";
return 0;
}
$ g++ -std=c++20 foo.cpp -o foo
With tzdata-2024a it correctly prints the local timezone. With tzdata-2024b it
displays "Etc/UTC"
$ g++ --version
g++ (GCC) 14.2.1 20240805
Arch Linux x86_64
Note: AFAICT Arch is using the standard "main" format for the tzdata (not
"rearguard" or "vanguard").
Apologies for not testing latest GCC trunk! If it works there, it would be
awesome to have the patch applied to the gcc-14 branch. Thanks!