Open nikclayton opened 7 months ago
Alternatively, instead of referencing the W3C profiles you could reference the ISO 8601 profile defined in RFC 3339 sect. 5.6. For completeness the Mastodon code could then be amended to use https://ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/DateTime.html#method-i-rfc3339 (with an argument of 3
to set the fractional seconds length).
The API documentation for fields that represent a date/time just say the type is "String (ISO 8601 Datetime)" (e.g., https://docs.joinmastodon.org/entities/Marker/#updated_at).
That's ambiguous, as ISO 8601 includes multiple possible string representations of a date/time.
In practice, Mastodon appears to use the extended format that specifies fractional seconds and includes a timezone designator.
This is consistent with https://www.w3.org/TR/NOTE-datetime which notes the potential for confusion:
Based on that I think the documentation should be amended as follows.