tzset and TZ
Sorin Manolache
sorinm@gmail.com
Fri Nov 20 15:01:00 GMT 2009
Hello,
I would like to propose a change in the implementation of tzset.
Currently, the initial ':' character in the environment variable TZ is
ignored and the same algorithm is executed regardless whether TZ=EST+5
or TZ=America/New_Yok.
This behaviour results in attempting to open the file $TZDIR/EST+5,
which most likely does not exist.
On a server that performs many timestamp conversions between timezones
on which I set TZ=EST+5 (and not America/New_York) I have one file
access attempt per conversion and a lot of wasted operating system
time.
If the initial colon was not ignored by tzset, TZ=:America/New_York
would rightfully result in a file access while a TZ=EST+5 would not.
I am aware that such a modification would break the applications that
set TZ=America/New_York (without the colon) but it is their fault,
because they do not obey the syntax of TZ.
Thank you for looking into this issue,
Sorin
More information about the Libc-alpha
mailing list