This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/812] mktime does not return -1
- From: "Danny dot Aizer at motorola dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 1 Jun 2005 11:34:31 -0000
- Subject: [Bug libc/812] mktime does not return -1
- References: <20050401034550.812.uttamp@us.ibm.com>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From Danny dot Aizer at motorola dot com 2005-06-01 11:34 -------
If mktime can return negative values for dates/times before 1970, it also means
that the value (time_t)-1 which is returned by mktime() can either mean:
1. Invalid tm structure (see the man page under RETURN VALUE)
2. Dec 31 23:59:59 UTC 1969 (assuming the local TZ variable is set to UTC)
3. Some other date and time in the +/-24 hours around the EPOCH, if the TZ
variable is set to some other non-UTC timezone.
This makes it almost impossible to guess whether the mktime() failed due to
invalid tm, or just gave a valid calculated negative answer.
--
http://sources.redhat.com/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.