Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5ead7f7b3fb9434fe9db2bde96e46dbcd6dab04a
Ticket: 3387109fffffffffffffffffffffffffffffffff
clock -timezone bug with tzdata files
User & Date: tjsilva on 2011-08-06 03:03:31
Changes

  1. assignee changed to: "kennykb"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    clock.tcl has errors that prevent finding files in the tzdata directory.  The regexp statement in proc LoadTimeZoneFile is incorrect, and prevents loading filenames with "+" in them, such as tzdata/GMT+0 or tzdata/Etc/GMT+5.  The regexp has the same problem with regard to numbers.  The existing code is:
       regexp {^[[.-.][:alpha:]_]+(?:/[[.-.][:alpha:]_]+)*$} $fileName
    But should probably be:
       regexp {^[[.-.][:alnum:]_+]+(?:/[[.-.][:alnum:]_+]+)*$} $fileName      <--- added + and changed alpha to alnum
    Another problem with LoadTimeZoneFile is that it first checks for TZData(NAME) instead of TZData(:NAME), which is what is set by all the tzdata files, so this code fails, but shouldn't :
       set now [clock sec]
       clock format $now -timezone GMT0     # results in existence of TZData(GMT0)
       clock format $now -timezone :GMT0    # LoadTimeZoneFile should load tzdata/GMT0, which will create TZData(:GMT0), but proc first checks TZData(GMT0)
    
    
  4. foundin changed to: "obsolete: 8.5.10"
  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: "tjsilva"
  10. subsystem changed to: "06. Time Measurement"
  11. title changed to: "clock -timezone bug with tzdata files"
  12. type changed to: "Bug"