|
The downside of this approach is that you end up processing a zoneinfo
file each time you just intend to call localtime/localtime_r.
Depending on the time zone that can take a substantial amount of time.
The zoneinfo files for Cairo, Chile and Jerusalem are over 8K on my
system.
To use tzset and localtime_r correctly in a multi-threaded environment
it is probably necessary to use a read/write lock or similar to make
sure no localtime_r call is in progress while tzset is parsing the
zoneinfo file.
Gé