GNU bug report logs - #35032
date: adjust rfc8601/3339 formats to W3C standard

Previous Next

Package: coreutils;

Reported by: Nicolas Mailhot <nicolas.mailhot <at> laposte.net>

Date: Thu, 28 Mar 2019 17:21:02 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Mailhot <nicolas.mailhot <at> laposte.net>
To: 35032 <at> debbugs.gnu.org
Subject: bug#35032: date ISO 8601 / RFC 3339 formats
Date: Thu, 28 Mar 2019 18:20:14 +0100
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




This bug report was last modified 5 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.