Overview
| Artifact ID: | e517210df234a391aeb944caeb8c6a8e156522fb |
|---|---|
| Ticket: | 218981ffffffffffffffffffffffffffffffffff
clock scan tomorrow fails to handle daylight savings time ch |
| User & Date: | nobody on 2000-10-26 01:08:54 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 3441 Bug Version: 8.1.1 SubmitDate: '1999-11-05' LastModified: '2000-01-12' Severity: MED Status: Released Submitter: techsupp ChangedBy: ericm OS: Other OSVersion: BSD/OS 4.0.1 FixedDate: '2000-01-12' FixedInVersion: 8.3b2 ClosedDate: '2000-10-25' Name: Robert Hare Comments: In our case we are setting timers to go off exactly at midnight each day. We use tomorrow to calculate the # of milleseconds to set the clock. One workaround is to do all calculations and use noon as the basis for date caluculations. This allows for the needed margin for daylight savings time changes as well as leap second changes. Some sample code: set t [clock scan "[clock format [clock seconds] -format "%m/%d/%Y"] 12:00:00" clock scan "[clock format [expr $t + 86400] -format "%m/%d/%Y"] 00:00:00" Happy Halloween, this problem will occur this Sunday. :-( ReproducibleScript: The "clock scan tomorrow" function will fail from 00:00 - 01:00 when going off daylight savings time. I suspect that other relative time functions (such as yesterday) will also have problems with daylight savings time transition days. To duplicate: % date 199910310000 - Set the system clock. % date - Confirm date set correctly. Sun Oct 31 00:00:03 MDT 1999 % tclsh8.1 - Enter Tcl % clock seconds - Get the clock value 941349616 % clock scan tomorrow - Get clock value for tomorrow 941436024 % exit - Exit Tcl % date -r 941436024 - Display clock value from "clock scan tomorrow". Sun Oct 31 23:00:24 MST 1999 - Notice it's not tomorrow, but simply 86400 seconds in future. ObservedBehavior: Receive a clock value for the same day. (86400 secons later) DesiredBehavior: Expect to receive a clock value for tomrrow. There was a bug in our handling of relative times for periods crossing the daylight savings time boundary. The bug has been fixed in 8.3b2: % clock format [clock scan tomorrow -base [clock scan 1999-10-31]] Mon Nov 01 00:00:00 PST 1999 - eric -- 01/12/2000 ericm - foundin changed to: "final: 8.1.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "48. Number Handling"
- title changed to:
clock scan tomorrow fails to handle daylight savings time ch
- type changed to: "Bug"