Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-18
06:44 • Ticket [218376ffff] Command clock scan "10/29/00 1 days" returns inc... artifact: 5280c76253 user: dgp
2000-10-26
08:21 • Closed ticket [218376ffff]. artifact: 62079cbc94 user: welch
00:56 • New ticket [218376ffff]. artifact: acc33c856c user: nobody

Command [clock scan "10/29/00 1 days"] returns incorrect dat

Closed / Fixed218376ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:56:51
OriginalBugID: 4316 Bug
Version: 8.1
SubmitDate: '2000-03-06'
LastModified: '2000-03-10'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: ericm
OS: Windows NT
OSVersion: Windows NT
Machine: IBM Compatible
FixedDate: '2000-10-25'
ClosedDate: '2000-03-10'


Name:
Christian G. Jantz

Extensions:
None

CustomShell:
None

ReproducibleScript:
I have been experiment with Tcl80 and Tcl81. The clock scan command does not always return the date which I expect.
When I run this two line program, if I use tcl80, I get 10/30/00. If I use tcl81, I get 10/29/00.
set GoalDate [ clock format [ clock scan "10/29/00 1 days" ] -format "%D" ]
puts "$GoalDate"

ObservedBehavior:
The date being returned is not what I expect.



This is most likely because of the daylight savings time rollover that occurs on that date.  Without knowing what timezone you are in, I cannot be 100% certain that is the problem you are seeing, but I am reasonably confident that it is.

The problem has been fixed as of 8.3.0, in which we overhauled parts of the clock scan subsystem so that it would handle DST conversions properly.  Now with 8.3.0, I see the following result:

% info patch
8.3.0
% clock format [clock scan "10/29/00 1 days"]
Mon Oct 30 00:00:00 PST 2000
% 

- eric

-- 03/10/2000 ericm
welch Closed ticket [218376ffff]. [History diff]2000-10-26 08:21:16
dgp Ticket [218376ffff]: 4 changes [History diff]2001-04-18 06:44:04
Log in (anonymous is fine) to add a comment.