[Ecls-list] segfault in DAYLIGHT-SAVING-TIME-P

Goffioul Michael goffioul at imec.be
Wed Nov 16 01:13:02 UTC 2005


> > Further info: with the above time value, the UTC computed in
> > daylight-saving-time-p is -1484, which is indeed before 
> 01/01/1970-00:00,
> > hence localtime() returns NULL.
> 
> I think I have fixed this. Now the way of computing daylight times is
> slightly different, and to avoid problems with operating system limits
> all dates are shifted into the 1970-2033 interval.

It still segfaults. Looking at the code, didn't you forget to re-shift
unix-time against utc-1-1-9170 in the (cond ((minusp unix-time)...
case (and maybe in the other case as well)? Otherwise, what you get in
unix-time is: utc-1-1-1980 + (utc - utc-1-1-sameyear), which is too large
for localtime(), the offset being against 1900 and not 1970 as expected
by it.

Michael.




More information about the ecl-devel mailing list