Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c3cacdb82ff1c34357d6989f122f820c7896bc61
Ticket: 1399323fffffffffffffffffffffffffffffffff
Enhancement: [clock format now ...] and [clock add now ...]
User & Date: rbrunner on 2006-01-07 18:37:39
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The following enhancement would be nice. (See c.l.t for
    reasonging)
    
    > cvs diff -u clock.tcl
    Index: clock.tcl
    ===================================================================
    RCS file: /cvsroot/tcl/tcl/library/clock.tcl,v
    retrieving revision 1.29
    diff -u -r1.29 clock.tcl
    --- clock.tcl   27 Dec 2005 17:39:02 -0000      1.29
    +++ clock.tcl   7 Jan 2006 14:43:25 -0000
    @@ -708,8 +708,12 @@
                "cannot use -gmt and -timezone in same call"
         }
         if { ![string is wide -strict $clockval] } {
    -       return -code error \
    -           "expected integer but got \"$clockval\""
    +       if { [string eq now $clockval] } {
    +           set clockval [clock seconds]
    +       } else {
    +           return -code error \
    +                   "expected integer but got
    \"$clockval\""
    +       }
         }
         if { ![string is boolean -strict $gmt] } {
            return -code error \
    @@ -4301,7 +4305,11 @@
                  ?-gmt boolean? ?-locale LOCALE?
    ?-timezone ZONE?\""
         }
         if { [catch { expr wide($clockval) } result] } {
    -       return -code error $result
    +       if { [string eq now $clockval] } {
    +           set clockval [clock seconds]
    +       } else {
    +           return -code error $result
    +       }
         }
    
         set offsets {}
    
  4. foundin changed to: "obsolete: 8.5a4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "rbrunner"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to:
    Enhancement: [clock format now ...] and [clock add now ...]
    
  11. type changed to: "RFE"