FW: Problems with timezone & altzone values
Olson, Arthur David (NIH/NCI) [E]
olsona at dc37a.nci.nih.gov
Thu Mar 18 14:05:00 UTC 2010
I'm forwarding this message from Madhusudanan Kandasamy, who is not on the time zone mailing list. Those of you who are on the list, please direct replies appropriately.
--ado
From: Madhusudanan Kandasamy [mailto:madhusudanan at in.ibm.com]
Sent: Thursday, March 18, 2010 6:05
To: tz at lecserver.nci.nih.gov
Subject: Problems with timezone & altzone values
Hi Olson,
As per POSIX standard timezone variable should be updated by tzset(), but its obvious that timezone values depends on what is the current time and during tzset() we won't be knowing the current time. So, for many countries, we are getting a wrong values for timezone and altzone for the current time. Hence is it possible to update the timezone and altzone values in localtime(), so atleast after calling the localtime we would be getting the correct values for both of these variables?
The other solution would be to call time() in tzset(), and update the altzone, timezone variables in tzset itself. This will have little performance overhead, but we would be having a accurate values w.r.t current system time. This new feature could be under a #ifdef macros, so it can be enabled only for the people who are wants these variables to be updated in tzset itself but with a performance penalty.
Also, is there any way available to get accurate values for these variables with the current version of the code?
Thanks,
Madhu.
_________________________________
Madhusudanan Kandasamy
AIX BOS Development,
IBM Bangalore, EGL D block 6th Floor.
More information about the tz
mailing list