-
AWS glossary says timestamp (date/time) is in ISO8601 format. But Smithy specification says timestamp (date-time) is in RFC3339 format. The difference may be whether to accept timestamp strings like Related: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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., However, from what you linked, it looks like the important difference is the precision of the sub-second fraction. RFC3339 calls for Edit: To answer, "what is correct," SDKs based on Smithy use the Smithy spec as what is correct for timestamps. Older SDKs not based on Smithy might be more lenient on what they accept and will remain that way for backwards compatibility. |
Beta Was this translation helpful? Give feedback.
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…