This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tzset and TZ


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]