rvdp@cs.vu.nl (Ronald van der Pol) (04/03/91)
Am I the only one who's having problems with SCO 3.2.2's times? Last weekend we changed to Daylight Saving Time. Now 'date' is telling the wrong time (sometimes it says we are at EST :-( syspro$ date Tue Apr 02 14:35:16 MET 1991 syspro$ cat time.c #include <stdio.h> #include <time.h> #define TIME_BUF_SIZE 50 main() { struct tm *ts; time_t tp; char buf[TIME_BUF_SIZE]; tzset(); if (time(&tp) == 0) { perror("time"); exit(1); } ts = localtime(&tp); strftime(buf, sizeof(buf), "%a %b %d %H:%M.%S %Z", ts); printf("current time is %s\n", buf); } syspro$ cc -o time time.c time.c syspro$ ./time current time is Tue Apr 02 15:36.56 MET syspro$ echo $TZ MET-1MET_DST,M3.5.0,M9.5.0 So it should be Tue Apr 02 15:37.00 MET_DST What is going on? -- Ronald van der Pol <rvdp@cs.vu.nl>