A patch for mktime.c and tz*.c.

H.J. Lu hjl@lucon.org
Sun Nov 8 09:07:00 GMT 1998


> I must reiterate that hjl's patch causes problems if the Olson tables
> are being used.  E.g. it assumes either a constant 1-hour or a
> constant 30-minute DST offset for New Zealand, and both assumptions
> are incorrect.
> 
> The basic idea behind hjl's patch is correct.  It's true that glibc
> knows the information that he is trying to have mktime obtain.  But
> the method used in the patch can't possibly work in general, and will
> break more real-world test cases than the 2.0.100 method breaks.

I know how to fix it if you can set me up a testcase. My original idea 
was whenever glibc computes a difference between SDT and DST for the
time asked, it saves it in a new variable __daylight_offset. Later,
I thought I could just use __daylight since it is how it is used in
the current glibc. I guess I could add __daylight_offset. It is clean
and no guessing.



-- 
H.J. Lu (hjl@gnu.org)



More information about the Libc-hacker mailing list