[Top][All Lists]

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

Re: bug in date: --rfc-3339=seconds and --rfc-3339=ns options do *not* o

From: Paul Eggert
Subject: Re: bug in date: --rfc-3339=seconds and --rfc-3339=ns options do *not* output timestamps in RFC 3339 format
Date: Wed, 03 May 2006 22:22:15 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Romain Lenglet <address@hidden> writes:

> "ISO 8601 states that the "T" may be omitted under some 
> circumstances.

Omitted, not replaced by a space.  ISO 8601 section 4.4 is quite
clear: it states "The space character shall not be used in the
representations."  RFC 3339 is equally clear: it says "Applications
using this syntax may choose, for the sake of readability, to specify
a full-date and full-time separated by (say) a space character."
Which is exactly what GNU date is doing.

What real-world need is driving this bug report?  Would this need
be satisfied by the following command instead?

date -u +'%Y-%m-%dT%H:%M:%SZ'

This command generates ISO-8601-conforming time stamps on any
POSIX-conforming host.  It's far more standard than anything else
that's been proposed on this thread.

Even if we were inclined to put in the "T", your two-line patch would
be incorrect, since it doesn't change the documentation to match the
behavior.  And the patch also breaks the round-trip property
guaranteed by the current documentation.  Fixing this would be

reply via email to

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