Feb. 14, 1996
4:26 p.m.
Call localtime() on the seemingly-in-error mktime() result, and compare the relevant portions of the structs tm. A match implies a non-error.
This doesn't sound very stable, but perhaps there is no other alternative. No errors are defined for localtime() either, so we would be assuming that the tm info it returns is correct. Of course, we only need to check this when the return of mktime() is -1, so perhaps the risk/impact is minimal. However, it might make sense to add documentation to this effect to the manpage for mktime() so folks don't assume that a -1 return from mktime() always means that the time specified is not representable. thanks, - Tom