This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: First draft of the Y2038 design document
- From: Rich Felker <dalias at libc dot org>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Albert ARIBAUD <albert dot aribaud at 3adev dot fr>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 27 Oct 2015 10:10:26 -0400
- Subject: Re: First draft of the Y2038 design document
- Authentication-results: sourceware.org; auth=none
- References: <20151026001252 dot 590e09c1 dot albert dot aribaud at 3adev dot fr> <562EEE05 dot 1080304 at cs dot ucla dot edu> <20151027034324 dot GW8645 at brightrain dot aerifal dot cx> <562F3C6E dot 30905 at cs dot ucla dot edu>
On Tue, Oct 27, 2015 at 01:57:18AM -0700, Paul Eggert wrote:
> Rich Felker wrote:
> >The relationship between time_t and broken down struct tm is strictly
> >specified and does not admit leap seconds.
>
> Although that's true for applications that specify POSIX TZ values,
> glibc supports leap seconds as an extension. Once you set the TZ
> environment variable to a value like "right/America/Los_Angeles"
> that is outside what POSIX allows, the implementation can do what it
> likes here.
POSIX does not permit the TZ variable to affect the result of gmtime,
only the result of localtime.
Rich