13 { 909312849L, "AEST-10AEDST-11,M10.5.0,M3.5.0",
14 "1998/10/25 21:54:09 dst=1 zone=AEDST" },
15 { 924864849L, "AEST-10AEDST-11,M10.5.0,M3.5.0",
16 "1999/04/23 20:54:09 dst=0 zone=AEST" },
25 for (cnt
= 0; cnt
< sizeof (tests
) / sizeof (tests
[0]); ++cnt
)
30 printf ("TZ = \"%s\", time = %ld => ", tests
[cnt
].tz
, tests
[cnt
].when
);
33 setenv ("TZ", tests
[cnt
].tz
, 1);
35 tmp
= localtime (&tests
[cnt
].when
);
37 snprintf (buf
, sizeof (buf
),
38 "%04d/%02d/%02d %02d:%02d:%02d dst=%d zone=%s",
39 tmp
->tm_year
+ 1900, tmp
->tm_mon
+ 1, tmp
->tm_mday
,
40 tmp
->tm_hour
, tmp
->tm_min
, tmp
->tm_sec
, tmp
->tm_isdst
,
41 tzname
[tmp
->tm_isdst
? 1 : 0]);
45 if (strcmp (buf
, tests
[cnt
].result
) == 0)