This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


> 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]