Skip to content
Tcl Source Code History Of Ticket 1832808fffffffff
Login

History Of Ticket 1832808fffffffff

Artifacts Associated With Ticket 1832808fffffffff

  1. Ticket change [43d9e83f11] (rid 116628) by lagardo on 2007-11-15 23:00:54:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      According to 
        http://www.tcl.tk/man/tcl8.5/TclCmd/clock.htm
      I should be able to specify a time zone to [clock scan]. 
      
      This appears to work is it is specified numerically (like "-800") but does not appear to recognize the advertised time zone names IF supplied as an option to [clock]. It does appear to work when supplied in the time string itself. 
      
      (Tcl) 1 % puts $tcl_patchLevel
      8.5b1
      (Tcl) 2 % clock scan "17:53" -timezone -800
      1195177980
      (Tcl) 3 % clock scan "17:53" -timezone PST
      time zone PST not found
      (Tcl) 4 % clock scan "17:53" -timezone pst
      time zone pst not found
      
      However:
      
      (Tcl) 5 % clock scan "17:53 pst" 
      1195177980
      
      All this is on a 
      
      (Tcl) 6 % puts $tcl_platform(os)
      Windows NT
      (Tcl) 7 % puts $tcl_platform(osVersion)
      5.1
      
      
    4. foundin initialized to: "obsolete: 8.5b1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "lagardo"
    10. subsystem initialized to: "06. Time Measurement"
    11. title initialized to: "time zones unrecognized [?]"
    12. type initialized to: "Bug"
  2. Ticket change [92f7ccf78d] (rid 105737) by kennykb on 2008-02-27 09:05:57:

    1. closedate changed to: "2008-02-27T02:05:57"
    2. closer changed to: "kennykb"
    3. icomment:
      Logged In: YES 
      user_id=99768
      Originator: NO
      
      The legacy time zone names like 'pst' are intentionally not accepted in the -timezone argument, but only in the date/time strings presented to the parser.  They are rejected because they are ambiguous; is "BST" "Brazilian Standard Time" or "British Summer Time?". They are also generally not what is desired for -timezone, because they are unaware of Daylight Saving Time and similar changes. (They must be accepted in input date/time strings, for compatibility with versions of Tcl prior to 8.5).
      
      To get the effect that you're after, use:
      
      clock scan "17:53" -timezone :America/Los_Angeles
                                                     (US)
      or
      
      clock scan "17:53" -timezone :America/Vancouver
      clock scan "17:53" -timezone :America/Whitehorse
      clock scan "17:53" -timezone :America/Dawson
                                                     (Canada)
      
      or 
      
      clock scan "17:53" -timezone :America/Tijuana
      clock scan "17:53" -timezone :America/Mazatlan
      clock scan "17:53" -timezone :America/Hermosillo
                                                     (Mexico)
      
      and you'll get the correct locale-dependent Daylight Saving Time rules.
      
      
    4. login: "kennykb"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "kennykb"