Date formats and ISO 8601
Stanimir Stamenkov
s7an10 at netscape.net
Thu Jul 28 05:14:12 UTC 2016
Tue, 26 Jul 2016 10:24:05 -0700, Adrian Klaver:
> On 07/26/2016 12:46 AM, Marcus Harnisch wrote:
>
>> 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."
Just for reference, couple of ISO 8601 applications suggest always
using the 'T':
https://www.w3.org/TR/NOTE-datetime
https://www.w3.org/TR/xmlschema11-2/#dateTime-lexical-mapping
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
--
Stanimir
More information about the Mercurial
mailing list