https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124554

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <[email protected]>:

https://gcc.gnu.org/g:663e5ade184813a8a5f6f76b873c3e212c1e8e75

commit r16-8167-g663e5ade184813a8a5f6f76b873c3e212c1e8e75
Author: Jonathan Wakely <[email protected]>
Date:   Sat Mar 14 10:32:11 2026 +0000

    libstdc++: Fix time zone transitions for Rule changes during DST [PR116110]

    The Australia/Broken_Hill example in PR libstdc++/116110 demonstrates a
    bug in the time zone code. The current code gives incorrect results when
    a zone changes from one named Rule to another during DST, e.g. the
    Broken_Hill time zone uses:

      9:30    AN    AC%sT  2000
      9:30    AS    AC%sT

    So the AS Rules take effect on 2000 Jan 1 which is during DST (which
    runs from October to March).

    The fix for this is to update info.offset and info.save when we find an
    active rule, instead of only updating the 'letters' variable.

    The new tests for Pacific/Kiritimati and Pacific/Apia have some FIXME
    comments. The UNTIL times of the zone changes are incorrectly
    interpreted as UTC not wall time (due to the main topic of Bug 116110),
    and the "24" time for the Pacific/Apia zone is incorrectly ignored so
    that the change happens 24h too early (due to Bug 124554). Those tests
    will need to be adjusted later when the bugs are fixed.

    libstdc++-v3/ChangeLog:

            PR libstdc++/116110
            * src/c++20/tzdb.cc (time_zone::_M_get_sys_info): Update
            info.offset and info.save to values from the active rule.
            * testsuite/std/time/time_zone/116110.cc: New test.

    Reviewed-by: Tomasz KamiÅski <[email protected]>

Reply via email to