This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: mktime has problem with 00 year
- From: Paul Pluzhnikov <ppluzhnikov at gmail dot com>
- To: Mohsen Pahlevanzadeh <mohsen at pahlevanzadeh dot org>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Wed, 7 Jan 2015 23:08:39 -0800
- Subject: Re: mktime has problem with 00 year
- Authentication-results: sourceware.org; auth=none
- References: <54AE271B dot 4040301 at pahlevanzadeh dot org>
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