This is the mail archive of the
mailing list for the glibc project.
[Bug libc/812] mktime does not return -1
- From: "uttamp at us dot ibm dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 4 Apr 2005 21:31:29 -0000
- Subject: [Bug libc/812] mktime does not return -1
- References: <email@example.com>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From uttamp at us dot ibm dot com 2005-04-04 21:31 -------
(In reply to comment #2)
> A negative value as the number of seconds since the Epoch is perfectly valid.
Yes, but the value returned by mktime (between -2147483648 and 2147483647) is
the maximum number of seconds can be represent using time_t where tm_year ranges
between (1-138) i.e. tm_year > 0. Can't we just add check to see if the input
tm_year is valid?
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.