Date formats and ISO 8601

Andreas Sewe sewe at st.informatik.tu-darmstadt.de
Wed Jul 27 09:20:14 UTC 2016


Hi all,

>> I just happened to notice that contrary to claims made by "hg help
>> dates", Mercurial does not support ISO 8601 format (cf.
>> https://en.wikipedia.org/wiki/ISO_8601). Could this be added? A common
>> standard would be really helpful in scripts where tools might generate
>> time stamps to be used by Mercurial.
> 
> I am guessing you are referring to the lack of T. That is permitted:
> 
> https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations
> 
> It is permitted to omit the 'T' character by mutual agreement.[21]
> 
> 21. "ISO 8601:2004(E)". ISO. 2004-12-01. "4.3.2 NOTE: By mutual
> agreement of the partners in information interchange, the character [T]
> may be omitted in applications where there is no risk of confusing a
> date and time of day representation with others defined in this
> International Standard."

FYI, variations like the above are why the W3C defined a profile of ISO
8601 [1]. (The Introduction lists a few more possible variations allowed
by the ISO standard.) This W3C note later evolved into definitions like [2].

Best wishes,

Andreas

[1] <https://www.w3.org/TR/NOTE-datetime>
[2] <https://www.w3.org/TR/xmlschema-2/#dateTime>




More information about the Mercurial mailing list