Artifacts Associated With Ticket 1902423fffffffff
Ticket change [0a33eb00ee] (rid 113774) by gneumann on 2008-02-26 18:55:13:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- 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. - foundin initialized to: "obsolete: 8.5.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "gneumann"
- subsystem initialized to: "06. Time Measurement"
- title initialized to: "clock format gives wrong result"
- type initialized to: "Bug"
Ticket change [7cfe8f9ff3] (rid 97171) by kennykb on 2008-02-27 09:07:55:
- closedate changed to: "2008-02-27T02:07:55"
- closer changed to: "kennykb"
- resolution changed to: "Fixed"
- status changed to: "Closed"