GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
libstdc++

libstdc++: Resolve UNTIL save adjustment for named-rule zones

Fixes inaccurate sys_info windows caused by incorrect DST transition handling in time zone data.

This commit resolves an issue in libstdc++ where time zone data for zones with wall-time UNTIL clauses and named rule sets was incorrectly parsed. Specifically, it affected zones like Africa/Algiers around 1977, causing brief incorrect sys_info windows during DST transitions. The fix defers save adjustment to _M_get_sys_info and correctly handles rule lookups, ensuring consistency with the canonical zic interpretation.

In Details

Fixes a bug in libstdc++'s time zone parsing (zones.cc) where the save value used to convert wall-time UNTIL clauses to UTC for named rule sets was miscalculated due to delayed rule loading. This resulted in incorrect sys_info windows near DST transitions. The change defers save adjustment to _M_get_sys_info and introduces new state flags (SaveKnown, SavePending, UntilPending) to manage rule application, ensuring correct boundary handling.

For Context
DST
Daylight Saving Time. A system of advancing clocks during warmer months so that darkness falls later in the evening according to the clock. This can lead to complex rule changes within time zone data.
UTC
Coordinated Universal Time. The primary time standard by which the world regulates clocks and time. It is equivalent to GMT and is the basis for other time zones.
sys_info
System information related to time, including current time, time zone, and DST status. In libstdc++, this refers to data structures holding timezone-related details.
zic
The timezone compiler, a standard Unix utility that compiles timezone description files into a binary format used by the operating system to determine local time.
Filed Under: libstdc++timezonebugfix