Hi Paul, Thanks for your response.
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 standards compliance?
No standard that I know of requires that mktime fail before the epoch.
Oops, that wasn't my point. The fact that standards don't require that mktime() *succeed* with times before the EPOCH (and the fact that mktime() has a problem or ambiguity with the -1 return) might have lead Solaris2 to document that the function only supported times for year 1970 or later.
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.
Is it a requirement (standards, etc) that localtime() work as an inverse of mktime(); more specifically, when dealing with times before the EPOCH? This was a point I raised previously on this thread. I don't think they are *required* to work this way (or any way) for times before the EPOCH, since the standards do not seem to be support pre-EPOCH times for these functions. If the documentation for the system (manpage, etc) states that these routines support pre-EPOCH times, then perhaps you have a case.
Solaris 2.5 has other problems in this area; see Sun bug 1229958 (``ctime, localtime functions slow and incorrect'').
Where can this be found? thanks much, - Tom