This is the mail archive of the libc-help@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]

Re: mktime has problem with 00 year


On Wed, Jan 7, 2015 at 10:43 PM, Mohsen Pahlevanzadeh
<mohsen@pahlevanzadeh.org> wrote:

> mktime crach with 00 time : 1900 - 1900:

1. Crash and return -1 are not the same thing. Which one did you observe?

2. Your program works fine for me (mktime returns -2203862400) on
x86_64 system with EGLIBC 2.19-0ubuntu6.4.

3. It does return -1 when compiled in 32-bit mode, but that's correct
result: 32-bit time_t can't represent values before 13 December 1901
or after 19 January 2038. See
http://en.wikipedia.org/wiki/Year_2038_problem


-- 
Paul Pluzhnikov


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