Discrepancy between zone.tab ordering and northamerica details
We just ran into a bug at work where users in US Central Time were identified as being in America/Indiana/Knox instead of in America/Chicago because code was running through the list of time zones in zone.tab looking for the first one that matched the current GMT offset and DST state, and America/Indiana/Knox is currently observing CDT and ordered before America/Chicago. I hope this is actually a use that the file ordering is intended to support, but even if it isn't, the zone.tab file seems to be misleading for some Indiana towns. In particular, northamerica says that Petersburg is Eastern and Knox is Central, but zone.tab says that Petersburg is Central and Knox is Eastern. I've attached a patch to bring zone.tab into line with northamerica, at least for these two places. Eric
Eric Fischer said:
We just ran into a bug at work where users in US Central Time were identified as being in America/Indiana/Knox instead of in America/Chicago because code was running through the list of time zones in zone.tab looking for the first one that matched the current GMT offset and DST state, and America/Indiana/Knox is currently observing CDT and ordered before America/Chicago.
I hope this is actually a use that the file ordering is intended to support,
I don't see how it can be. In general, there are going to be multiple zones that match a given GMT offset and DST state, so what makes anyone think that the first one that matches is theirs? If it were always true, we wouldn't need the other ones. -- Clive D.W. Feather | Work: <clive@demon.net> | Tel: +44 20 8495 6138 Internet Expert | Home: <clive@davros.org> | Fax: +44 870 051 9937 Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646 THUS - a Cable and Wireless business
Eric's change to zone.tab looks reasonable; unless someone finds a problem I'll make it a part of next week's ftp version. --ado -----Original Message----- From: Eric Fischer [mailto:enf@pobox.com] Sent: Monday, October 20, 2008 9:18 To: tz@lecserver.nci.nih.gov Subject: Discrepancy between zone.tab ordering and northamerica details We just ran into a bug at work where users in US Central Time were identified as being in America/Indiana/Knox instead of in America/Chicago because code was running through the list of time zones in zone.tab looking for the first one that matched the current GMT offset and DST state, and America/Indiana/Knox is currently observing CDT and ordered before America/Chicago. I hope this is actually a use that the file ordering is intended to support, but even if it isn't, the zone.tab file seems to be misleading for some Indiana towns. In particular, northamerica says that Petersburg is Eastern and Knox is Central, but zone.tab says that Petersburg is Central and Knox is Eastern. I've attached a patch to bring zone.tab into line with northamerica, at least for these two places. Eric --- zone.tab.orig 2008-10-08 05:35:57.000000000 -0700 +++ zone.tab 2008-10-20 18:14:59.878269000 -0700 @@ -384,13 +384,13 @@ US +364947-0845057 America/Kentucky/Monticello Eastern Time - Kentucky - Wayne County US +394606-0860929 America/Indiana/Indianapolis Eastern Time - Indiana - most locations US +384038-0873143 America/Indiana/Vincennes Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties -US +411745-0863730 America/Indiana/Knox Eastern Time - Indiana - Starke County US +410305-0863611 America/Indiana/Winamac Eastern Time - Indiana - Pulaski County US +382232-0862041 America/Indiana/Marengo Eastern Time - Indiana - Crawford County +US +382931-0871643 America/Indiana/Petersburg Eastern Time - Indiana - Pike County US +384452-0850402 America/Indiana/Vevay Eastern Time - Indiana - Switzerland County US +415100-0873900 America/Chicago Central Time US +375711-0864541 America/Indiana/Tell_City Central Time - Indiana - Perry County -US +382931-0871643 America/Indiana/Petersburg Central Time - Indiana - Pike County +US +411745-0863730 America/Indiana/Knox Central Time - Indiana - Starke County US +450628-0873651 America/Menominee Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties US +470659-1011757 America/North_Dakota/Center Central Time - North Dakota - Oliver County US +465042-1012439 America/North_Dakota/New_Salem Central Time - North Dakota - Morton County (except Mandan area)
participants (3)
-
Clive D.W. Feather -
Eric Fischer -
Olson, Arthur David (NIH/NCI) [E]