public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug time/31558] New: mktime wildly mishandles times near Pacific/Apia tz discontinuity
@ 2024-03-25 20:42 bugdal at aerifal dot cx
  2024-03-27 16:49 ` [Bug time/31558] " schwab@linux-m68k.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bugdal at aerifal dot cx @ 2024-03-25 20:42 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31558

            Bug ID: 31558
           Summary: mktime wildly mishandles times near Pacific/Apia tz
                    discontinuity
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: time
          Assignee: unassigned at sourceware dot org
          Reporter: bugdal at aerifal dot cx
  Target Milestone: ---

Given tm_year=2011-1900, tm_mon=12-1, tm_mday=31, all other fields 0, and
TZ=Pacific/Apia, glibc mktime produces an output of 2012-01-01 01:00:00 (time_t
1325329200), offset a whole day forward from what it should be. The affected
input is not even a time in the omitted day (2011-12-30 does not exist in this
zone) but 1 hour into the following day, which exists. The problem seems to be
related to how tm_isdst=0 is being applied - DST is active at this time - but
with or without it applied, the time never falls into the limbo day.

Discovered as part of a monster thread about the topic of this zone transition
on the musl libc mailing list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-02 18:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 20:42 [Bug time/31558] New: mktime wildly mishandles times near Pacific/Apia tz discontinuity bugdal at aerifal dot cx
2024-03-27 16:49 ` [Bug time/31558] " schwab@linux-m68k.org
2024-03-27 17:00 ` bugdal at aerifal dot cx
2024-03-27 18:23 ` schwab@linux-m68k.org
2024-03-28 12:48 ` schwab@linux-m68k.org
2024-03-28 21:01 ` eggert at cs dot ucla.edu
2024-04-02 11:08 ` schwab@linux-m68k.org
2024-04-02 13:07 ` bugdal at aerifal dot cx
2024-04-02 16:42 ` eggert at cs dot ucla.edu
2024-04-02 17:07 ` bugdal at aerifal dot cx
2024-04-02 18:52 ` eggert at cs dot ucla.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).