Skip to content
Tcl Source Code View Ticket
Login

View Ticket

[clock] fails to populate TZData array

Closed / Fixed2886853fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-10-27 02:56:31
[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
%
kennykbplain2009-10-27 10:25:18
Thanks for the bug report.  Fixed in HEAD and core-8-5-branch.
Log in (anonymous is fine) to add a comment.