[PING^2] RFC [PATCH] BZ#1077902: New API gettimezone
Paul Eggert
eggert@cs.ucla.edu
Thu May 1 06:22:00 GMT 2014
Carlos O'Donell wrote:
> even if you had identical files there is presently no
> programmatic API to determine your own TZ
But there is a programmatic API, namely getenv ("TZ"). If the chrooted
files are identical, and if the TZ value (or lack of value) is
propagated into the chrooted process, localtime should behave the same
way inside the chrooted jail as it does outside.
That is, it's not necessary to set TZ to the same string both inside and
outside the jail. All that's necessary is that if TZ is set outside the
jail, it must be set to the same value inside the jail, and vice versa.
> Do we agree that there is a flaw in the API here?
That depends on what one means by "flaw". :-) My impression so far has
been that most of the problem has been due to a lack of understanding of
how time zones work in glibc. If my impression is correct, then perhaps
all we need to do is improve the documentation.
More information about the Libc-alpha
mailing list