This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/22639] New: year 2039 bug for localtime etc. on 64-bit platforms
- From: "eggert at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 20 Dec 2017 22:45:15 +0000
- Subject: [Bug libc/22639] New: year 2039 bug for localtime etc. on 64-bit platforms
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22639
Bug ID: 22639
Summary: year 2039 bug for localtime etc. on 64-bit platforms
Product: glibc
Version: 2.26
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: eggert at gnu dot org
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Created attachment 10697
--> https://sourceware.org/bugzilla/attachment.cgi?id=10697&action=edit
Demonstrate the Y2039 bug in glibc localtime
On 64-bit platforms, localtime and related functions work correctly in the year
2039 (the first full year after a 32-bit time_t would overflow), but they stop
working in March 2039.
The attached program illustrates the bug. It uses US Pacific time rules, and
should output this:
2039-04-30 14:00:00 PDT
because DST should be observed in April 2039. However, it incorrectly outputs
this:
2039-04-30 13:00:00 PST
The same bug occurs if one sets TZ=America/Los_Angeles in the putenv call. The
bug appears to affect all years starting in 2039.
This bug was first reported on the tz mailing list by user Random832 here:
https://mm.icann.org/pipermail/tz/2017-December/025795.html
I observed the bug on Fedora 27 x86-64.
--
You are receiving this mail because:
You are on the CC list for the bug.