On Tue, Jan 21, 2014 at 8:33 PM, Otto Moerbeek <o...@drijf.net> wrote: ... > Right. what happens is that localtime(3) returns NULL, because the > year is not representable as an int. struct tm.tm_year must be an int > according to posix. > > The diff below catches the case.
ok guenther@ > But it does not solve that 64-bit > time_t can represent years that do not fit into the int sized tm_year. Sure, and before there was the problem that there were struct localtime values that mktime() could not convert to a time_t. Lacking types of fractional bit width, we have to live with one or the other, no? Philip Guenther