[Bug libstdc++/124853] std::chrono::time_zone misinterprets a Zone line's first sys_info for zones whose rule set has wall-time rules whose effective firing time depends on a prior rule's save (cascading wall TIME)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 16 13:26:03 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124853
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tomasz Kaminski <tkaminsk@gcc.gnu.org>:
https://gcc.gnu.org/g:610134a51fa3d0bcd3e0980c6574557172dc88c0
commit r17-2462-g610134a51fa3d0bcd3e0980c6574557172dc88c0
Author: Tomasz KamiÅski <tkaminsk@redhat.com>
Date: Thu Jul 16 12:50:32 2026 +0200
libstdc++: Apply rule triggering at Zone line transition [PR124853]
When seeding zone information from the application of the rules
prior the transition, we should consider the rule triggering exactly
at boundary, not only prior, i.e. call find_active_rule with info.begin.
Due the rule_start - t < days(1) check (that is not removed yet), such
transitions were effectively ignored.
This addresses regressions introduced by r17-2060-gf7cde200320e08,
where new differences between outputs of libstdc++ and date library were
introduced for some zones (e.g. Europe/Lisbon in 1976). With this fixup,
the patch is now pure improvement in consistency.
libstdc++-v3/ChangeLog:
PR libstdc++/124853
* src/c++20/tzdb.cc (time_zone::_M_get_sys_info): Find
rules firing exactly at transition time.
* testsuite/std/time/time_zone/wall_cascade.cc: Add test
for Europe/Lisbon, and corrected test_negative.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz KamiÅski <tkaminsk@redhat.com>
More information about the Gcc-bugs
mailing list