While testing my iCalendar timezone code against mktime/localtime I think I found a tiny error. (This is on RedHat Linux 7.1, with tzcode/data2001a) In Asia/Bishkek, when converting 11 Apr 1992 18:30:00 UTC into local time it outputs 'Sun Apr 12 00:30:00 1992'. (Any UTC time between 18:00 and 19:00 seems to be incorrect.) But clocks go forward at 0:00 local time by 1 hour, so I don't think that time should exist. (I may have missed something, though. This timezone stuff does get a bit too confusing!) I've attached a little test program. Damon
From: Damon Chaplin <damon@ximian.com> Date: 15 Oct 2001 18:20:36 -0400
While testing my iCalendar timezone code against mktime/localtime I think I found a tiny error.
Thanks for the bug report. I have verified that it is an error, apparently in zic.c. The following patch to 'asia' works around the bug, but of course it'd be better to fix zic.c. --- asia Tue Oct 9 10:31:30 2001 +++ /tmp/asia Mon Oct 15 17:31:36 2001 @@ -841,7 +841,7 @@ # Kyrgyzstan (Kirgizstan) # Transitions through 1991 are from Shanks. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Kirgiz 1992 1996 - Apr Sun>=7 0:00 1:00 S +Rule Kirgiz 1992 1996 - Apr Sun>=7 0:00s 1:00 S Rule Kirgiz 1992 1996 - Sep lastSun 0:00 0 - Rule Kirgiz 1997 max - Mar lastSun 2:30 1:00 S Rule Kirgiz 1997 max - Oct lastSun 2:30 0 - Here is a small zic input file that reproduces the bug: Rule Kirgiz 1992 only - Apr Sun>=7 0:00 1:00 S Rule Kirgiz 1992 only - Sep lastSun 0:00 0 - Zone Asia/Bishkek 5:00 1:00 FRUST 1991 Aug 31 2:00 5:00 Kirgiz KG%sT With this input, "zdump -v Asia/Bishkek" outputs: Asia/Bishkek Fri Dec 13 20:45:52 1901 UTC = Sat Dec 14 02:45:52 1901 FRUST isdst=1 Asia/Bishkek Sat Dec 14 20:45:52 1901 UTC = Sun Dec 15 02:45:52 1901 FRUST isdst=1 Asia/Bishkek Fri Aug 30 19:59:59 1991 UTC = Sat Aug 31 01:59:59 1991 FRUST isdst=1 Asia/Bishkek Fri Aug 30 20:00:00 1991 UTC = Sat Aug 31 01:00:00 1991 KGT isdst=0 Asia/Bishkek Sat Apr 11 17:59:59 1992 UTC = Sat Apr 11 22:59:59 1992 KGT isdst=0 Asia/Bishkek Sat Apr 11 18:00:00 1992 UTC = Sun Apr 12 00:00:00 1992 KGST isdst=1 Asia/Bishkek Sat Sep 26 17:59:59 1992 UTC = Sat Sep 26 23:59:59 1992 KGST isdst=1 Asia/Bishkek Sat Sep 26 18:00:00 1992 UTC = Sat Sep 26 23:00:00 1992 KGT isdst=0 Asia/Bishkek Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 08:14:07 2038 KGT isdst=0 Asia/Bishkek Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 08:14:07 2038 KGT isdst=0 and the April 1992 transition is off by an hour.
On Mon, 2001-10-15 at 22:02, Paul Eggert wrote:
From: Damon Chaplin <damon@ximian.com> Date: 15 Oct 2001 18:20:36 -0400
While testing my iCalendar timezone code against mktime/localtime I think I found a tiny error.
Thanks for the bug report. I have verified that it is an error, apparently in zic.c.
In case you're interested, I've now tested our code pretty thoroughly against tzcode2001a (in RedHat Linux 7.1), and that was the only error I found. The test program stepped from 1970 to 2037 every 15 minutes, and converted the UTC time to local time and back, comparing the local times against mktime(). It did this for all the timezones that used city names, e.g. 'Europe/London' - we don't use stuff like 'Etc/GMT-1'. Damon
participants (2)
-
Damon Chaplin -
Paul Eggert