Feb. 14, 1996
1:16 a.m.
How do we distinguish between the two?
We don't, as far as I know. ANSI C, as noted, doesn't specify that "mktime()" sets "errno", so it appears there's no way of distinguishing between "a valid 'struct tm' value that happens to translate to a 'time_t' value of -1" and "an error". (It also doesn't specify whether "tm_wday" and "tm_yday" are set if the "struct tm" can't be converted, so it doesn't seem to allow you to stuff some impossible value there and check whether it got set to some non-impossible value and, if it did, assume it succeeded.)