#4447 [clock] fails to populate TZData array

obsolete: 8.5.7
closed-fixed
Kevin B KENNY
5
2009-10-27
2009-10-27
Aaron Hurt
No

[clock] will not populate the TZData if you scan without a date against a timezone that has not yet been seen in the current interp... example:

[ahurt@charlie ~]$ tclsh
% info patchlevel
8.5.7
% array names ::tcl::clock::TZData
% clock scan 1200 -timezone {:America/New_York} -format {%H%M}
can't read "TZData(:America/New_York)": no such element in array
% array names ::tcl::clock::TZData
:localtime :Etc/UTC :Etc/GMT :Tcl/Localtime :UTC :GMT
% clock scan 20010101 -timezone {:America/New_York} -format {%Y%m%d}
978325200
% array names ::tcl::clock::TZData
:localtime :America/New_York :Etc/UTC :Etc/GMT :Tcl/Localtime :UTC :GMT
% clock scan 1200 -timezone {:America/New_York} -format {%H%M}
1256572800
%

Discussion

  • Kevin B KENNY
    Kevin B KENNY
    2009-10-27

    • status: open --> closed-fixed
     
  • Kevin B KENNY
    Kevin B KENNY
    2009-10-27

    Thanks for the bug report. Fixed in HEAD and core-8-5-branch.