Skip to content
Tcl Source Code History Of Ticket 1505383
Login

History Of Ticket 1505383

Artifacts Associated With Ticket 1505383

  1. Ticket change [b443a31d0f] (rid 124997) by tallniel on 2006-06-13 12:55:14:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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.
      
    4. foundin initialized to: "obsolete: 8.5a5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "tallniel"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "clock format %W broken"
    11. type initialized to: "Bug"
  2. Ticket change [5b6f77fe64] (rid 118324) by tallniel on 2006-06-13 19:55:15:

    1. icomment:
      
      
      File Added - 181506: clockformatW.patch
      
      
      
    2. login: "tallniel"
    3. mimetype: "text/plain"
    4. username: "tallniel"
  3. Add attachment "clockformatW.patch" [c6e332737f] (rid 121848) by tallniel on 2006-06-13 19:55:15.

  4. Ticket change [b130d04c90] (rid 98112) by tallniel on 2006-06-13 19:56:06:

    1. assignee changed to: "kennykb"
  5. Ticket change [d461949433] (rid 123433) by dkf on 2006-06-13 20:23:29:

    1. subsystem changed to: "06. Time Measurement"
  6. Ticket change [fcc14ad28e] (rid 108294) by mistachkin on 2006-06-14 00:41:08:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      
      I think some of the other format specifiers are also broken
      (at least %Ey and %EY):
      
      clock format [clock seconds] -format %Ey
      % can't use empty string as operand of "-"
          while executing
      "expr { [dict get $date year]
                                               - [lindex $etable
      $index 2] }"
          (procedure "GetLocaleEra" line 9)
          invoked from within
      "GetLocaleEra  $date[set date {}]  {}"
          (procedure "::tcl::clock::formatproc'%Ey'C" line 6)
          invoked from within
      "$formatter $clockval $timezone"
          (procedure "::tcl::clock::format" line 74)
          invoked from within
      "clock format [clock seconds] -format %Ey"
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  7. Ticket change [fb6b5728fe] (rid 92065) by kennykb on 2006-07-31 02:01:45:

    1. closedate changed to: "2006-07-30T19:01:45"
    2. closer changed to: "kennykb"
    3. icomment:
      Logged In: YES 
      user_id=99768
      
      Joe Mistachkin's comments are a separate bug, which would
      get tickled in some combinations of %E without %O.
      
      Neil's analysis of the %W bug is fixed.  (Neil, why on
      Earth were you using %W, anyway? The ISO week number is
      %V - %W is for compatibility with some legacy software
      but is not correct for any known calendar.)
      
      Both bugs are now fixed.
      
      
    4. login: "kennykb"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "kennykb"