[PING^2] RFC [PATCH] BZ#1077902: New API gettimezone
Rich Felker
dalias@libc.org
Wed Apr 30 19:31:00 GMT 2014
On Wed, Apr 30, 2014 at 11:30:32AM -0700, Paul Eggert wrote:
> On 04/30/2014 08:49 AM, P J P wrote:
> >It sounds more of incorrect or buggy time zone file.
>
> No, that time zone file is not buggy. It's generated by the
> standard tzdata distribution, it uses the documented file layout,
> and many other time zone files are like it. For details, please see
> the tzfile man page.
>
> >TZ variable provides offsets which are added to the UTC times to
> >get the local time, right?
>
> That's basically right. (TZ also can provide leap-second info,
> which maps TAI to UTC, but let's ignore that for now.)
This is actually a bug. The TZ variable is not specified to modify the
behavior of functions that work with non-local time, and in fact
having gmtime return different results based on the TZ variable is
non-conforming.
Rich
More information about the Libc-alpha
mailing list