Skip to content

Timestamp format #2296

Answered by jdisanti
Nugine asked this question in Q&A
Discussion options

You must be logged in to vote

The ISO8601 spec is quite large and includes a lot more date formats than RFC3339. This website illustrates those differences. Of note: ISO8601 specifies durations (e.g., P3Y6M4DT12H30M5S) as well as timestamps, and the Smithy timestamp shape does not support durations. Thus, the Smithy spec uses RFC3339 to be more clear about what is actually supported.

However, from what you linked, it looks like the important difference is the precision of the sub-second fraction. RFC3339 calls for time-secfrac = "." 1*DIGIT in its ABNF, which means 1 or more digits. So technically any number of digits after . are valid. I am not familiar with what is allowed for ISO8601 on the sub-second fraction, but…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nugine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants