FW: Timezone logic bug in tzcode
Olson, Arthur David (NIH/NCI) [E]
olsona at dc37a.nci.nih.gov
Tue Jul 27 13:55:26 UTC 2010
I'm forwarding this message from Kang Seonghoon, who is not on the time zone mailing list. Those of you who are on the list, please direct replies appropriately.
--ado
-----Original Message-----
From: Kang Seonghoon [mailto:someone at mearie.org]
Sent: Tuesday, July 27, 2010 12:58
To: tz at lecserver.nci.nih.gov
Subject: Timezone logic bug in tzcode
Hello,
While tracking a weird timezone bug present in Mac OS X and Darwin, I
determined the bug lies in the tzcode package. I'm not sure when the
bug first appeared but the affected versions include
tzcode2010{j,k}.tar.gz at the minimum.
The problematic part is settzname() function in localtime.c. When
USG_COMPAT flag is set it initializes timezone and altzone variables,
but since it (incorrectly) assumes the last non-DST rule is current it
assigns a wrong value to them. For a counter-example see Asia/Seoul
timezone: in this case timezone should be UTC+9:00 but set to UTC+8:00
instead. As far as I concerned the code is also present in FreeBSD and
Darwin, and in Darwin it produces a wrong result for strftime(3) call
as a consequence. (I'm going to report this issue to Apple
separately.)
Regards,
Kang Seonghoon
More information about the tz
mailing list