Zeugswetter Andreas SB <[EMAIL PROTECTED]> writes:
> Yes, the annoyance is, that localtime works for dates before 1970
> but mktime doesn't. Best would probably be to assume no DST before
> 1970 on AIX and IRIX.
That seems like a reasonable answer to me, especially since we have
other platforms
Pete Forman writes:
> One workaround would be to add 4*n to tm_year and subtract (365*4+1)
> *24*60*60*n from the time_t returned. (All leap years are multiples
> of 4 in the range 1901 to 2038. If tm_wday is wanted, that will need
> to be adjusted as well.)
FWIW, that should be to add 28*n
Zeugswetter Andreas SB writes:
> Try the attachment with negative values, and tell us whether mktime
> returns anything other that -1. Do you have an idea how else we
> could determine daylight savings time ?
mktime always returns -1 for tm's that might expect to return a
negative number. In
> > > On AIX mktime(3) leaves tm_isdst at -1 if it does not have timezone
> > > info for that particular year and returns -1.
> > > The following code then makes savings time out of the -1.
> > > tz = (tm->tm_isdst ? (timezone - 3600) : timezone);
> > Hmm. That description is consistant with wha