In message <199610291921.LAA16622@shade.twinsun.com> so spake Paul Eggert (eggert):
If mktime returns -1 then that is a bug, but I can't reproduce the bug when building tzcode96l on Solaris 2.5.1. I used
make cc=gcc CFLAGS='-DHAVE_GETTEXT=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_SETTIM EOFDAY=3 -DHAVE_STRERROR=1 -DHAVE_UTMPX_H=1'
to build tzcode96l. mktime had the behavior described above (it returned 667529999 for the positive tm_isdst case).
Hmm, under hpux 10.10 with : make cc=gcc CFLAGS='-DHAVE_LONG_DOUBLE=1 -DHAVE_SETTIMEOFDAY=3 -DHAVE_UTMPX_H=1 -DHAVE_STRERROR=1 and TZ=dst0std,J057,J059 I also get a return value of -1. Under solaris 2.5 with the exact parameters you have above I also get a return value of -1 with TZ=dst0std,J057,J059. I'm using the following simple test linked with $(LIBOBJS) (localtime.o asctime.o difftime.o). - todd #include <stdio.h> #include <stdlib.h> #include <time.h> main() { struct tm tm; time_t t; (void) memset(&tm, 0, sizeof(tm)); tm.tm_hour = 2; tm.tm_mday = 26; tm.tm_mon = 1; tm.tm_year = 91; tm.tm_wday = 2; (void) putenv("TZ=dst0std,J057,J059"); t = mktime(&tm); printf("Time is %ld\n", t); exit(0); }