https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
Rok Mihevc <rok.mihevc at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rok.mihevc at gmail dot com
--- Comment #1 from Rok Mihevc <rok.mihevc at gmail dot com> ---
I encountered a related issue with Australia/Broken_Hill around year 2000,
where the zone transitions from AN (New South Wales) rules to AS (South
Australia) rules. (See
https://github.com/apache/arrow/pull/48601#issuecomment-3687604703 for
context).
#include <chrono>
#include <iostream>
int main() {
using namespace std::chrono;
auto* tz = locate_zone("Australia/Broken_Hill");
auto info = tz->get_info(sys_days{2000y / February / 29d} + 23h + 23min +
23s);
std::cout << "offset: " << duration_cast<minutes>(info.offset).count() << "
min\n";
std::cout << "save: " << duration_cast<minutes>(info.save).count() << "
min\n";
std::cout << "abbrev: " << info.abbrev << "\n";
}
Outputs (GCC 14.2):
offset: 570 min
save: 0 min
abbrev: ACDT
Expected:
offset: 630 min
save: 60 min
abbrev: ACDT
Per the tzdb AN rules, DST started 1999-10-31 and ends 2000-03-26. February
29, 2000 falls within DST, so offset should be 9:30 base + 1:00 DST = 10:30
(630 min).
The output is also internally inconsistent: abbrev="ACDT" (daylight) but
offset=570 and save=0 indicate standard time.
This could be related to the same root cause—incorrect handling of zone rule
transitions and the UNTIL field interpretation.