This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/2821] New: mktime() returns 2147483647 for various dates > 2038


#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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]