Skip to content
Tcl Source Code History Of Ticket 1902423fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1902423fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1902423fffffffffffffffffffffffffffffffff

  1. Ticket change [0a33eb00ee] (rid 113774) by gneumann on 2008-02-26 18:55:13:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      clock format returns under certain conditions an incorrect "%T" in the formatted time-string, when "%H:%M:%S" was requested
      
      Example (see result of the 2nd [clock format ...]):
      
      % set s [clock seconds]
      1204049747
      % set f1 [clock format $s -format "%Y-%m-%d %T"]
      2008-02-26 19:15:47
      % set f2 [clock format $s -format "%Y-%m-%d %H:%M:%S"]
      2008-02-26 %T
      % set ::tcl_patchLevel
      8.5.1
      
      
      the used locale is "C".
      
      A quick analysis shows that  ParseClockFormatFormat2 builds an incorrect formatting proc:
      ===================
      proc ::tcl::clock::formatproc'%Y-%m-%d %H:%M:%S'C {clockval timezone} {
              
                       variable TZData
                       set date [GetDateFields $clockval $TZData($timezone)  2299161]
                   
              return [::format {%04d-%02d-%02d %%T}  [dict get $date year] [dict get $date month] [dict get $date dayOfMonth]]
      }
      ===================
      One can see that for some reasons, %%T was added to the format string. The reason seems to be that 
      
      LocalizeFormat C {%Y-%m-%d %H:%M:%S}
      returns {%Y-%m-%d %T}, 
      
      most likely due to a caching bug.
      
      
      
    4. foundin initialized to: "obsolete: 8.5.1"
    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: "gneumann"
    10. subsystem initialized to: "06. Time Measurement"
    11. title initialized to: "clock format gives wrong result"
    12. type initialized to: "Bug"
  2. Ticket change [7cfe8f9ff3] (rid 97171) by kennykb on 2008-02-27 09:07:55:

    1. closedate changed to: "2008-02-27T02:07:55"
    2. closer changed to: "kennykb"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"