First draft of the Y2038 design document
Rich Felker
dalias@libc.org
Tue Oct 27 20:57:00 GMT 2015
On Tue, Oct 27, 2015 at 01:48:05PM -0700, Paul Eggert wrote:
> On 10/27/2015 07:10 AM, Rich Felker wrote:
> >POSIX does not permit the TZ variable to affect the result of gmtime
>
> Sure it does. If an application sets TZ to a value prohibited by
> POSIX, then the program is not a conforming application (in the
> POSIX sense), which means the implementation can do as it likes. The
> implementation can dump core, for example. Or the implementation's
> time functions can all start counting leap seconds, which is what
> glibc and several other C libraries do.
It doesn't work that way. A program which does not use functions which
are specified to depend on the TZ environment variable has
well-defined behavior regardless of the value set in the TZ variable
and whether it matches the POSIX timezone form.
Rich
More information about the Libc-alpha
mailing list