Overview
| Artifact ID: | b443a31d0f4fac177a283cfc3ed2a4dd15c17c96 |
|---|---|
| Ticket: | 1505383fffffffffffffffffffffffffffffffff
clock format %W broken |
| User & Date: | tallniel on 2006-06-13 12:55:14 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
clock format %W option is broken in current CVS: % info pa 8.5a5 % clock format [clock seconds] -format %W can't read "Wweeknumber": no such variable % set errorInfo can't read "Wweeknumber": no such variable while executing "::format %02d $Wweeknumber" (procedure "::tcl::clock::formatproc'%W'C" line 11) invoked from within "$formatter $clockval $timezone" (procedure "::tcl::clock::format" line 74) invoked from within "::tcl::clock::format 1150202323 -format %W" ("uplevel" body line 1) invoked from within "uplevel 1 [info level 0]" (procedure "::tcl::clock::format" line 4) invoked from within "clock format [clock seconds] -format %W" % info body tcl::clock::formatproc'%W'C variable TZData set date [GetDateFields $clockval $TZData($timezone) 2299161] set WweekNumber [expr { ( [dict get $date dayOfYear] - [dict get $date dayOfWeek] + 7 ) / 7 }] return [::format %02d $Wweeknumber] The problem is this last reference to $Wweeknumber in the format: the 'n' should be capitalised. As this is generated code, the actual bug is in library/clock.tcl line 4625, proc tcl::clock::ParseClockFormatFormat2. I attach a patch that fixes this. - foundin changed to: "obsolete: 8.5a5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "tallniel"
- subsystem changed to: "16. Commands A-H"
- title changed to: "clock format %W broken"
- type changed to: "Bug"