diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/clock.tcl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/clock.tcl b/library/clock.tcl index 2a4c7bd..0696c47 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -3411,7 +3411,7 @@ proc ::tcl::clock::LoadZoneinfoFile { fileName } { proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { variable MINWIDE variable TZData - if { ![info exists fname] } { + if { ![file exists $fname] } { return -code error "$fileName not found" } @@ -3502,8 +3502,10 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { set i 0 set abbrevs {} foreach a $abbrList { - dict set abbrevs $i $a - incr i [expr { [string length $a] + 1 }] + for {set j 0} {$j <= [string length $a]} {incr j} { + dict set abbrevs $i [string range $a $j end] + incr i + } } # Package up a list of tuples, each of which contains transition time, |