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

obsolete: 8.3
closed-invalid
Kevin B KENNY
5
2003-05-09
2003-05-09
Anonymous
No

Email: limin.wu@noaa.gov

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]

Discussion

  • Kevin B KENNY
    Kevin B KENNY
    2003-05-09

    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.

     
  • Kevin B KENNY
    Kevin B KENNY
    2003-05-09

    • status: open --> closed-invalid