This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: A patch for mktime.c and tz*.c.
- To: eggert@twinsun.com (Paul Eggert)
- Subject: Re: A patch for mktime.c and tz*.c.
- From: hjl@lucon.org (H.J. Lu)
- Date: Sun, 8 Nov 1998 09:07:36 -0800 (PST)
- Cc: drepper@cygnus.com, libc-hacker@cygnus.com (GNU C Library)
> 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)