mktime bug?
Olson, Arthur David (NCI)
olsona at dc37a.nci.nih.gov
Thu May 13 01:57:42 UTC 1999
I'm unable to duplicate the problem.
--ado
Script started on Thu May 13 03:49:04 1999
gertrude$ cat mktimetest.c
#include <stdio.h>
#include <time.h>
#include <errno.h>
int main()
{
struct tm tm;
time_t secs;
memset(&tm, 0, sizeof tm);
tm.tm_year = 99;
tm.tm_mon = 4;
tm.tm_mday = 13;
secs = mktime(&tm);
printf("secs: %ld\n", secs);
if (secs < 0)
printf("strerror(errno): %s\n", strerror(errno));
return 0;
}
gertrude$ cc mktimetest.c libtz.a -o mktimetest
gertrude$ TZ=Europe/Paris ./mktimetest
secs: 926550000
gertrude$ TZ=America/New_York ./mktimetest
secs: 926571600
gertrude$ TZ=CET-1CEST-2 ./mktimetest
secs: 926550000
gertrude$ exit
script done on Thu May 13 03:50:23 1999
More information about the tz
mailing list