Overview
| Artifact ID: | fe64c2bfc48f6424aeaf61eabc3317a434ee6810 |
|---|---|
| Ticket: | 1929060fffffffffffffffffffffffffffffffff
[clock scan] gets confused by [clock format] |
| User & Date: | andygoth on 2008-03-30 01:18:05 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
Run the following two commands in a fresh tclsh: % clock format 0 -format "%D %H:%M:%S" % clock scan "01/01/1970 00:00:00"\ -format "%m/%d/%Y %H:%M:%S" The following error is returned: input string does not match supplied format while executing "$scanner $string $base $timezone" (procedure "::tcl::clock::scan" line 82) invoked from within "clock scan "01/01/1970 00:00:00"\ -format "??/??/210 H:M:0x00000000"" ("uplevel" body line 1) invoked from within "uplevel #0 clock\ scan\ \"01/01/1970\ 00:00:00\"\\\n\ \ \ -format\ \"??/??/210\ H:M:0x00000000\"" Now start another tclsh and run the following three commands: % clock scan "01/01/1970 00:00:00"\ -format "%m/%d/%Y %H:%M:%S" % clock format 0 -format "%D %H:%M:%S" % clock scan "01/01/1970 00:00:00"\ -format "%m/%d/%Y %H:%M:%S" No error is returned; instead, 21600 is returned, as expected. It looks like running [clock format] before the first [clock scan] can potentially screw up the internal state of the [clock] command. This problem was originally discovered by Peter Turner. His email address is similar to Peter.Turner@com!forthc . He experienced it when using my timebox command, found at http://andy.junkdrome.org/devel/timebox/ . - foundin changed to: "obsolete: 8.5.2"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "andygoth"
- subsystem changed to: "16. Commands A-H"
- title changed to: "[clock scan] gets confused by [clock format]"
- type changed to: "Bug"