Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-05-10
02:06 • Closed ticket [735391ffff]: Inconsistency in converting 02/10/27 and 02/10/28 to... artifact: a7ad4efd39 user: kennykb
2003-05-09
18:55 • New ticket [735391ffff]. artifact: 707321fd4a user: nobody

Inconsistency in converting 02/10/27 and 02/10/28 to seconds

Closed / Invalid735391ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-05-09 18:55:28
Email: [email protected]

Tcl Version: 8.3
OS Platform: HP-UX B.10.20 A 9000/785
Problem Behavior: 90000
Expected Behavior: 86400
Concise Code Sample: 

  set seconds1 [clock scan "10/27/02"]
  set seconds2 [clock scan "10/28/02"]

  puts [expr $seconds2-$seconds1]
  puts [expr 24*60*60]
kennykbplain2003-05-10 02:06:47
Logged In: YES 
user_id=99768

In a US locale, the clocks "fall back" on the last Sunday in October. so midnight on 27 October 2002 is twenty-five 
hours before midnight on 28 October.

You won't see the problem if you use -gmt true, or if you round to the nearest day.
Log in (anonymous is fine) to add a comment.