Feb. 14, 1996
2:42 p.m.
The standards for mktime() define a return value of (time_t)-1 as indicating that the time specified cannot be represented. However, a return value of -1 is also a valid time_t corresponding to 31-DEC-1969 23:59:59 GMT. How do we distinguish between the two?
Call localtime() on the seemingly-in-error mktime() result, and compare the relevant portions of the structs tm. A match implies a non-error.