Skip to content
Tcl Source Code View Ticket
Login

View Ticket

clock scan treats now the same as today

Closed / Fixed218026ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:52:19
OriginalBugID: 1193 RFE
Version: 8.1a2
SubmitDate: '1999-02-11'
LastModified: '1999-09-20'
Severity: MED
Status: Closed
Submitter: pat
ChangedBy: hobbs
OS: Windows 98
Machine: X86
FixedDate: '2000-10-25'
ClosedDate: '1999-09-20'


Name:
Christopher Nelson

ReproducibleScript:
# Compute seconds elapsed today:
expr [clock scan now] - [clock scan today]

ObservedBehavior:
The result of the above is 0.

DesiredBehavior:
"now" seems to indicate clock time and "today" calendar time.  I'd expect [clock scan today] to return the time at 00:00 today and [clock scan now] to be essentially the same as [clock seconds].  Obviously, I can use [clock scan 00:00] to get mignight today and [clock seconds] for the trivial examples given but having now and today be equivalent limits their usefulness in more complex uses of [clock scan].



It is true that "now" and "today" are the same, but there are
actually the same as [clock seconds], not [clock scan 00:00].
This is better than the case mentioned above, since it seems
perfectly acceptable to make today now, instead of 00:00.
Yesterday is thus 24 hours before now. 
-- 09/20/1999 hobbs
welch Closed ticket [218026ffff]. [History diff]2000-10-26 08:13:42
dgp Ticket [218026ffff]: 3 changes [History diff]2001-04-05 06:56:34
Log in (anonymous is fine) to add a comment.