Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9f95ec61cdb5984ae8c7aa7a3fe68f21c753fa17
Ticket: 3518851fffffffffffffffffffffffffffffffff
Unable to parse Africa/Windhoek Olsen time zone
User & Date: bovineone on 2012-04-17 16:52:42
Changes

  1. assignee changed to: "kennykb"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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?
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "bovineone"
  10. subsystem changed to: "06. Time Measurement"
  11. title changed to: "Unable to parse Africa/Windhoek Olsen time zone"
  12. type changed to: "Bug"