mktime() failure vs 31-DEC-1969 23:59:59 GMT
eggert at twinsun.com
Sat Feb 17 03:06:48 UTC 1996
From: tomp at zk3.dec.com
Date: Wed, 14 Feb 96 10:42:07 -0500
> My man page on mktime() (Solaris2) clearly says that 'tm_year
> of the tm structure must be for year 1970 or later.'
This would seem to limit the usefulness of timezone rules prior
to 1970 with respect to mktime(). Perhaps they did this for
No standard that I know of requires that mktime fail before the epoch.
Most likely Solaris 2 does it that way because SVR4.0 did it that way.
I've asked Sun to fix this, since the Solaris 2.5 behavior is
schizophrenic. For example, Solaris 2.5 localtime works fine on times
before the epoch, which means that mktime is not the inverse of
localtime as it should be.
Solaris 2.5 has other problems in this area; see Sun bug 1229958
(``ctime, localtime functions slow and incorrect'').
More information about the tz