[Bug libstdc++/108211] New: std::chrono::current_zone() fails if zone only has one component
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 23 14:34:37 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108211
Bug ID: 108211
Summary: std::chrono::current_zone() fails if zone only has one
component
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
$ ls -l /etc/localtime
lrwxrwxrwx. 1 root root 25 Mar 15 2017 /etc/localtime ->
../usr/share/zoneinfo/UTC
Libstdc++ incorrectly assumes the local timezone will be "foo/bar" and so it
breaks for "UTC" or any other name without a slash in it.
terminate called after throwing an instance of 'std::runtime_error'
what(): tzdb: cannot determine current zone
This causes:
FAIL: std/time/tzdb/1.cc execution test
FAIL: std/time/zoned_time/custom.cc execution test
More information about the Gcc-bugs
mailing list