w3c / wot-thing-description

Web of Things (WoT) Thing Description
http://w3c.github.io/wot-thing-description/
Other
131 stars 63 forks source link

date-time differences w.r.t. spec and JSON schema #1962

Open danielpeintner opened 8 months ago

danielpeintner commented 8 months ago

In our document we use date-time for example for created and modified see https://w3c.github.io/wot-thing-description/#thing

In the TD spec we point to https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#dateTime which in the end is consistent with ISO 8601.

On the other hand in our JSON schema we use RFC3339 date-time

https://github.com/w3c/wot-thing-description/blob/73e21a8c96f317796da235beb86762aee02d66ad/validation/td-json-schema-validation.json#L1398-L1405

There are examples that work for both, e.g, 2020-12-09T16:09:53+00:00 but there are variants that are not valid for both (e.g., without T between date and time). see https://stackoverflow.com/a/65221179