[Bug libstdc++/116110] Transitions obtained from chrono::time_zone::get_info should not treat times as UTC

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110

--- Comment #26 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Tomasz Kaminski
<[email protected]>:

https://gcc.gnu.org/g:296b23d0b9e70cf8f416d0a502e0bfbf520fc4d4

commit r14-12779-g296b23d0b9e70cf8f416d0a502e0bfbf520fc4d4
Author: Tomasz KamiÅski <[email protected]>
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 <[email protected]>
    Signed-off-by: Tomasz KamiÅski <[email protected]>
    (cherry picked from commit 57a09e2f362ab8a8be84250fd4266b333a74b977)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.