This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2821] New: mktime() returns 2147483647 for various dates > 2038
- From: "wbardwel at curl dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 22 Jun 2006 21:33:19 -0000
- Subject: [Bug libc/2821] New: mktime() returns 2147483647 for various dates > 2038
- Reply-to: sourceware-bugzilla at sourceware dot org
#include <stdio.h>
#include <time.h>
int main()
{
struct tm t2 = { 0, 0, 0, 1, 1, 2050 - 1900, 1, 1, 1};
time_t tt2 = mktime(&t2);
printf("%ld\n");
return 0;
}
That should print -1, but instead it prints 2147483647.
Sometime in 2063 mktime() starts returning -1 as it should.
--
Summary: mktime() returns 2147483647 for various dates > 2038
Product: glibc
Version: 2.3.5
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: wbardwel at curl dot com
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: i686-pc-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=2821
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.