This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/812] mktime does not return -1
- From: "futhark at users dot sourceforge dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 28 Sep 2005 07:56:51 -0000
- Subject: [Bug libc/812] mktime does not return -1
- References: <20050401034550.812.uttamp@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From futhark at users dot sourceforge dot net 2005-09-28 07:56 -------
Of course it is true that negative values are valid, but the problem that I see
is that -1 is not always returned for an error. If I call mktime() for January
1st, 1880 with a 32-bit time_t, I get -1 (correct). If I call mktime() for
January 1st, 1890, I get -2147483648 (INT_MIN), which is not correct. If I call
mktime() for January 1st, 1900, I also get -2147483648. Both of those values
should have been -1, since the parameters to mktime() could not be represented
in a time_t.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=812
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.