From: Alexandre F. <ale...@gm...> - 2013-08-10 20:54:19
|
On Sat, Aug 10, 2013 at 7:55 PM, Arnulf Wiedemann <ar...@wi...> wrote: > Hello, > A colleague of me has problems with clock format with tclsh8.6 (final > version): > % clock format [clock seconds] -timezone :America/Brasilia > % time zone ":America/Brasilia" not found > > nevertheless there exists in lib/tcl8.6/clock.tcl > 327: {-10800 0 3600 0 2 0 5 2 0 0 0 0 11 0 1 2 0 0 0} :America/Brasilia > > what also works is: > % clock format [clock seconds] -timezone :America/Buenos_Aires > Wed Aug 07 05:11:42 ART 2013 > > What is the reason for that problem or what are we doing wrong? You'll note that the working case (Buenos_Aires) is supported by a file in tzdata. That file loads a value at key ":America/Buenos_Aires" of the TZData array. While your non-working case (Brasilia) has no such file, and none of the files stores anything in TZData(:America/Brasilia). What you saw in clock.tcl is a load into a reverse dict WinZoneInfo, which maps vectors of values to names. I have no familiarity with [clock] internals, especially what purpose this reverse mapping serves (and the Win prefix makes me Wince), but it looks like there is no built-in mechanism to make sure the mapping is bijective... -Alex |