|
2012-04-18
| ||
| 20:00 | • Ticket [3518851fff] Unable to parse Africa/Windhoek Olsen time zone status s... artifact: e11d944361 user: kennykb | |
| 19:59 | • Ticket [3518851fff]: 4 changes artifact: 16a530b9b7 user: kennykb | |
| 19:54 | • Closed ticket [3518851fff]. artifact: 4c4a48f218 user: kennykb | |
|
2012-04-17
| ||
| 23:54 | • Ticket [3518851fff]: 4 changes artifact: 657fce2542 user: bovineone | |
| 23:52 | • Add attachment clock-tcl-trace.txt to ticket [3518851fffffffff|3518851f... artifact: 7f1a869820 user: bovineone | |
| 23:52 | • Ticket [3518851fff] Unable to parse Africa/Windhoek Olsen time zone status s... artifact: b6a9208e32 user: bovineone | |
| 16:52 | • New ticket [3518851fff]. artifact: 9f95ec61cd user: bovineone | |
Unable to parse Africa/Windhoek Olsen time zone
Closed / Duplicate3518851fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2012-04-17 16:52:42
Because the built-in Tcl timezone definitions are frequently lagging current updates, we want to rely on the OS zoneinfo files instead. However, the internal proc ::tcl::clock::ReadZoneinfoFile (located in library/clock.tcl) seems unable to parse the :Africa/Windhoek timezone Olsen file that is a part of the zoneinfo-2012.c distribution.
To replicate this condition on FreeBSD 8.2, do the following:
1) cd /usr/ports/misc/zoneinfo && make install
2) mv /usr/local/lib/tcl8.5/tzdata /usr/local/lib/tcl8.5/tzdata-OFFLINE
3) echo "clock format [clock seconds] -timezone :Africa/Windhoek" | /usr/local/bin/tclsh8.5
It will emit 'time zone ":Africa/Windhoek" not found' because an error was caught during ReadZoneinfoFile. All other Olsen files that I've tried appear to be parsed fine.
By using TclX's cmdtrace, I've found that the line in ReadZoneinfoFile that is raising an error is:
key "5" not known in dictionary
while evaluating {dict get {0 LMT 4 SWAT 9 SAST 14 CAT 18 WAST 23 {}} 5}
That corresponds to the line in clock.tcl that reads:
set abbrev [dict get $abbrevs $abbrInd]
Can someone confirm whether the Africa/Windhoek zonefile is corrupt, or is the clock.tcl making an incorrect assumption about the file format?
bovineoneplain2012-04-17 23:52:43
File Added - 441477: clock-tcl-trace.txt
bovineoneplain2012-04-17 23:54:43
For reference, the Africa/Windhoek zonefile has this information: $ ls -l /usr/share/zoneinfo/Africa/Windhoek -r--r--r-- 1 root wheel 1556 Apr 9 10:16 /usr/share/zoneinfo/Africa/Windhoek $ md5 /usr/share/zoneinfo/Africa/Windhoek MD5 (/usr/share/zoneinfo/Africa/Windhoek) = 2497beb897d0df019d88cb8fca24f0fb
kennykbplain2012-04-18 19:54:51
allow_comments - 1 The Windhoek bug it tclZIC was fixed over a year ago; see the commit at http://core.tcl.tk/tcl/info/6ae7178df2 As of today, the Fossil trunk and the tip of the core-8-5-branch contain tzdata2012c (admittedly, this is a couple of weeks late, sorry!) So Casablanca, Damascus, Gaza, Hebron and Port-au-Prince are all up to date. I recommend that if you need a tzdata change, you first check the Fossil repository to see if it's there. Tcl *releases* may lag tzdata by a significant amount (we don't try to qualify a Tcl release every time some legislature, somewhere, messes with the clock), but we do try to keep the code repository up to date.
kennykbplain2012-04-18 19:59:30
Oops, sorry, had the wrong commit for Windhoek; it was actually http://core.tcl.tk/tcl/info/dc71499520 that fixed the bug. In any case, it's fixed.
kennykbplain2012-04-18 20:00:06
Duplicate of 3470928
Log in (anonymous is fine) to add a comment.
Attachments:
- clock-tcl-trace.txt [download] added by bovineone on 2012-04-17 23:52:43. [details]