bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35032: date ISO 8601 / RFC 3339 formats


From: Nicolas Mailhot
Subject: bug#35032: date ISO 8601 / RFC 3339 formats
Date: Thu, 28 Mar 2019 18:20:14 +0100
User-agent: Roundcube Webmail/1.4-rc1

Hi

A long, long time ago, in 1997, W3C looked at the monument ISO 8601 was, and produced a simplified profile for mere mortals:
https://www.w3.org/TR/NOTE-datetime

It serves as formatting basis in XML, IJSON, etc

Sometime later, in 2002, the IETF took this note, fleshed it out a little, and produced RFC 3339

And then coreutils date took it all and grew the --iso-8601 and --rfc-3339

Unfortunately, coreutils managed to make both of those incompatible with the W3C iso-8601 profile lots of software languages use:

1. The W3C profile mandates T as time separator, and ":" as hour/minutes separator
2. RFC 3339 makes both optional

Then, logically, date removed the ":" for its --iso-8601 option,
$ date --iso-8601=seconds
2019-03-28T18:09:47+0100

and then removed T from its --rfc-3339 option
$ date --rfc-3339=seconds
2019-03-28 18:10:11+01:00

Graaa

Would it be possible to make them both optional in --rfc-3339, and both mandatory in --iso-8601 ? Or add a --w3c option that conforms to the W3C profile? This is all so sad… Some languages like Go do no understand neither of date's output, because they follow the W3C profile.

Regards,

--
Nicolas Mailhot





reply via email to

[Prev in Thread] Current Thread [Next in Thread]