12 { "1113472456 +1000", 36000 },
13 { "1113472456 -1000", -36000 },
14 { "1113472456 +10", 36000 },
15 { "1113472456 -10", -36000 },
16 { "1113472456 +1030", 37800 },
17 { "1113472456 -1030", -37800 },
18 { "1113472456 +0030", 1800 },
19 { "1113472456 -0030", -1800 },
20 { "1113472456 -1330", LONG_MAX
},
21 { "1113472456 +1330", LONG_MAX
},
22 { "1113472456 -1060", LONG_MAX
},
23 { "1113472456 +1060", LONG_MAX
},
24 { "1113472456 1030", LONG_MAX
},
26 #define ntests (sizeof (tests) / sizeof (tests[0]))
34 for (int i
= 0; i
< ntests
; ++i
)
38 if (strptime (tests
[i
].fmt
, "%s %z", &tm
) == NULL
)
40 if (tests
[i
].gmtoff
!= LONG_MAX
)
42 printf ("round %d: strptime unexpectedly failed\n", i
);
48 if (tm
.tm_gmtoff
!= tests
[i
].gmtoff
)
50 printf ("round %d: tm_gmtoff is %ld\n", i
, (long int) tm
.tm_gmtoff
);