[tz] mktime() clarification
Dag-Erling Smørgrav
des at des.no
Mon Mar 25 21:08:07 UTC 2024
"Clive D.W. Feather via tz" <tz at iana.org> writes:
> There is no requirement in the C99 Standard (I dropped out of WG14 shortly
> after) that the call to mktime is made before the value of errno is read.
True, I was a little hasty in abbreviating my example, but beside the
point, as you'd realize if you'd bothered to try it.
struct tm tm = { .tm_mday = 1, .tm_year = 69 };
errno = 0;
time_t ret = mktime(&tm);
printf("%ld %d\n", (long)ret, errno);
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the tz
mailing list