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: hjl@lucon.org
- Subject: Re: A patch for mktime.c and tz*.c.
- From: Paul Eggert <eggert@twinsun.com>
- Date: Fri, 13 Nov 1998 18:48:46 -0800 (PST)
- CC: drepper@cygnus.com, libc-hacker@cygnus.com
- References: <m0zcYJM-000393C@ocean.lucon.org>
From: hjl@lucon.org (H.J. Lu)
Date: Sun, 8 Nov 1998 09:07:36 -0800 (PST)
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.
Something like this should work, but you'll have to add a new lock for
mktime; otherwise the code won't survive in the presence of multiple
threads. It might be cleaner to add a new internal glibc function
that, given a time_t value, tells you the DST offset for that value.
(If the current code works I'd just leave it alone.)