Artifacts Associated With Ticket 1075433
Ticket change [5b54c9daff] (rid 118301) by nobody on 2004-11-29 18:08:54:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The man pages for clock scan command implies that you can read a ISO 8601 point-in-time specifications. I looked at the specification and examples from , http://www.w3.org/TR/NOTE-datetime , and find that not all case are able to be parsed (in Tcl 8.4.8). See test the results below: Year: # YYYY (eg 1997) % clock format [clock scan 1997] unable to convert date-time string "1997" Year and month: # YYYY-MM (eg 1997-07) % clock format [clock scan 1997-07] unable to convert date-time string "1997-07" Complete date: # YYYY-MM-DD (eg 1997-07-16) % clock format [clock scan 1997-07-16] Wed Jul 16 12:00:00 AM Eastern Daylight Time 1997 Complete date plus hours and minutes: # YYYY-MM-DDThh:mmTZD (eg 1997-07- 16T19:20+01:00) % clock format [clock scan 1997-07-16T19:20+01:00] unable to convert date-time string "1997-07- 16T19:20+01:00" # but if we remove the time zone offset it works but is one hour to fast!!! % clock format [clock scan 1997-07-16T19:20] Wed Jul 16 8:20:00 AM Eastern Daylight Time 1997 # removing the T gives us the correct time ?? strange % clock format [clock scan "1997-07-16 19:20"] Wed Jul 16 7:20:00 PM Eastern Daylight Time 1997 # also if we remove the dashes and leave the T % clock format [clock scan "19970716T19:20:00"] Wed Jul 16 7:20:00 PM Eastern Daylight Time 1997 Complete date plus hours, minutes and seconds: # YYYY-MM-DDThh:mm:ssTZD (eg 1997-07- 16T19:20:30+01:00) % clock format [clock scan 1997-07- 16T19:20:30+01:00] unable to convert date-time string "1997-07- 16T19:20:30+01:00" Complete date plus hours, minutes, seconds and a decimal fraction of a second # YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07- 16T19:20:30.45+01:00) % clock format [clock scan 1997-07- 16T19:20:30.45+01:00] unable to convert date-time string "1997-07- 16T19:20:30.45+01:00" where: YYYY = four-digit year MM = two-digit month (01=January, etc.) DD = two-digit day of month (01 through 31) hh = two digits of hour (00 through 23) (am/pm NOT allowed) mm = two digits of minute (00 through 59) ss = two digits of second (00 through 59) s = one or more digits representing a decimal fraction of a second TZD = time zone designator (Z or +hh:mm or -hh:mm) Mike Jacobson [email protected] - foundin initialized to: "obsolete: 8.4.8"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "16. Commands A-H"
- title initialized to:
clock scan does not handle all ISO 8601 time formats
- type initialized to: "Bug"
Ticket change [576095bdc5] (rid 94477) by dgp on 2004-11-30 01:32:08:
- subsystem changed to: "06. Time Measurement"
Ticket change [7845cb19b8] (rid 89933) by dgp on 2004-11-30 01:32:09:
- assignee changed to: "kennykb"
Ticket change [148dc3158c] (rid 124413) by kennykb on 2004-11-30 02:39:32:
- icomment:
Logged In: YES user_id=99768 The man page has always lied about ISO8601 compliance. In fact, YYYYMMDDTHHMMSS and YYMMDDTHHMMSS are the only ISO8601 formats that free-form [clock scan] recognizes. I do *not* plan to add formats to free-form [clock scan], because all the ambiguity in the parsing is a nightmare already, and each new format compounds the problem. Instead, let me refer you to the Wiki page: http://wiki.tcl.tk/13094 where I discuss the planned approach in 8.5 to recognizing a broader variety of ISO8601 formats. I welcome comments, there or here.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [014db55c2e] (rid 119457) by kennykb on 2004-11-30 02:39:54:
- priority changed to: "1 Zero"
Ticket change [2b9d04c925] (rid 118769) by kennykb on 2004-12-13 22:54:37:
- closedate changed to: "2004-12-13T15:54:37"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 Requested documentation made on both the trunk and the 8.4 branch. See http://wiki.tcl.tk/13094 for an approach to scanning ISO8601 dates and times using the 8.5 facilities.
- login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "kennykb"