This is the mail archive of the glibc-bugs@sources.redhat.com 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/812] mktime does not return -1


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


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