March 25, 2024
9:08 p.m.
"Clive D.W. Feather via tz" <tz@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@des.no