Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
06:56 • Ticket [218518ffff] clock scan doesn't support ISO date formats status s... artifact: e1ea463e50 user: dgp
2000-10-26
08:23 • Closed ticket [218518ffff]. artifact: 686e7f5b7c user: welch
01:01 • New ticket [218518ffff]. artifact: 053dfc7713 user: nobody

clock scan doesn't support ISO date formats

Closed / Fixed218518ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:01:34
OriginalBugID: 847 Bug
Version: 8.0.3
SubmitDate: '1998-11-25'
LastModified: '2000-01-10'
Severity: MED
Status: Released
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 740 784 954 1245 1363 1957
OS: All
OSVersion: NA
Machine: NA
FixedDate: '2000-01-10'
FixedInVersion: 8.3b2
ClosedDate: '2000-10-25'


Name:  Matt Newman
email:  [email protected]
OperatingSystem:  Windows NT
Extensions:  too many to mention
CustomShell:  I fixed this in 7.3, and posted the patches (several years ago), but have not had the time to do the same (AGAIN) for tcl 8.0 :-(
Synopsis:  clock scan doesn't support ISO date formats

ReproducibleScript:
clock scan "19981113 15:11"

or

clock scan "19981113T15:11"
# ISO point-in-time format
or

clock scan "1998-11-13 15:11"
# ISO format permits '-'

ObservedBehavior:
ISO date formats not recognised by Tcl's clock scan.

DesiredBehavior:
All standard ISO date formats should be parsable. Tcl is a fantastic "Platform", but lets itself down in some areas such as this.

Comments:
In addition to the ISO date formats, clock scan should recognise all additional "standard" formats that are allowed in the recent HTTP 1.1 spec.



I added rules to parse
CCYY-MM-DD
CCYYMMDD
YY-MM-DD
YYMMDD
CCYYMMDDTHHMMSS
CCYYMMDD HHMMSS
CCYYMMDDTHH:MM:SS

That is the most interesting ISO 8601 formats.  I have deliberately not done things like 1995-02 (CCYY-MM), because it is ambiguous, and 1995W01 (CCYY"W"WW), because it's a major pain in the butt.

- eric

-- 01/10/2000 ericm
welch Closed ticket [218518ffff]. [History diff]2000-10-26 08:23:19
dgp Ticket [218518ffff]: 3 changes [History diff]2001-04-05 06:56:33
Log in (anonymous is fine) to add a comment.