Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 820bb649b5f6664b1ff1ac03c2849ef2a5760ea7
Ticket: 218412ffffffffffffffffffffffffffffffffff
clock format -format %H output incorrect
User & Date: nobody on 2000-10-26 00:57:16
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 5444 Bug
    Version: 8.3.1
    SubmitDate: '2000-05-11'
    LastModified: '2000-05-11'
    Severity: SER
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Linux
    Machine: Dell Inspiron 7000
    FixedDate: '2000-10-25'
    ClosedDate: '2000-05-11'
    
    
    Name:
    Bruce Edge
    
    Comments:
    This is all based on the assumption that I can use clock format with
        relative times. It handles the minutes and seconds correctly, just not
        the hours.
    
    ReproducibleScript:
    clock.tcl:
    
    set date1 "03/01/2000 00:14:03"
    set date2 "03/01/2000 00:15:10"
    
    set t1 [clock scan $date1]
    set t2 [clock scan $date2]
    set tdiff [expr ($t2 - $t1)]
    puts "$t2 - $t1 = $tdiff"
    puts "[clock format $tdiff -format %H], [clock format $tdiff -format %M], [clock format $tdiff -format %S]"
    
    > tclsh clock.tcl                                ~/customers/mexico/cdr
    951898510 - 951898443 = 67
    16, 01, 07
    
    ObservedBehavior:
    The output for [clock format $tdiff -format %H] should be 00, not 16.
    
    DesiredBehavior:
    > tclsh clock.tcl                                ~/customers/mexico/cdr
    951898510 - 951898443 = 67
    00, 01, 07
    
    
    
    The format is correct, as it's based off the epoch.  The user
    wants different time calculations for time elapsed.  Note also
    that there needs to be only one clock format command above. 
    -- 05/11/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.3.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "48. Number Handling"
  10. title changed to: "clock format -format %H output incorrect"
  11. type changed to: "Bug"