[Bug libstdc++/116110] Transitions obtained from chrono::time_zone::get_info should not treat times as UTC
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 31 10:10:53 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
--- Comment #23 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Tomasz Kaminski
<tkaminsk@gcc.gnu.org>:
https://gcc.gnu.org/g:a3b110420ad422270974f2d42a019c88d389669e
commit r15-11431-ga3b110420ad422270974f2d42a019c88d389669e
Author: Tomasz KamiÅski <tkaminsk@redhat.com>
Date: Fri Jul 17 21:14:42 2026 +0200
libstdc++: Fix condition for stopping lazy zone expansion [PR116110]
At indicated by the pre-existing comment, the lazy zone expansion can be
only resumed from STD (save == 0) zone. However, the current condition
for stopping on DST (save != 0) doesn't ensure that, as some rule specify
transitions between DST zones. For example August 1945 of Y rule used by
America/Dawson only change letters:
Y 1942 o - F 9 2 1 W
Y 1945 o - Au 14 23u 1 P
This patch correct the condition, by using next_rule (i.e. one applying
after last expanded zone): either there is no zone (last expanded range)
or it have save zero.
libstdc++-v3/ChangeLog:
PR libstdc++/116110
* src/c++20/tzdb.cc (time_zone::_M_get_sys_info): Correct
condition for stopping zone expansion before STD zone.
* testsuite/std/time/time_zone/116110.cc (test_dawson):
Add test for America/Dawson August 1945 transition.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz KamiÅski <tkaminsk@redhat.com>
(cherry picked from commit 57a09e2f362ab8a8be84250fd4266b333a74b977)
More information about the Gcc-bugs
mailing list