GNU bug report logs - #6132
date: --rfc-3339=TIMESPEC option doesn't print 'T'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: "F. Alexander Njemz" <f.alexander.njemz@HIDDEN>; dated Fri, 7 May 2010 15:08:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'date: --rfc-3339=TIMESPEC option doesn't print 'T'' from 'bug in date: --rfc-3339=TIMESPEC option doesn't print 'T'' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 6132 <at> debbugs.gnu.org:


Received: (at 6132) by debbugs.gnu.org; 8 May 2010 10:19:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 08 06:19:08 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OAh7k-0007y1-6T
	for submit <at> debbugs.gnu.org; Sat, 08 May 2010 06:19:08 -0400
Received: from mail-fx0-f44.google.com ([209.85.161.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <f.alexander.njemz@HIDDEN>)
	id 1OAfTG-0007HQ-IT
	for 6132 <at> debbugs.gnu.org; Sat, 08 May 2010 04:33:15 -0400
Received: by fxm4 with SMTP id 4so1296621fxm.3
	for <6132 <at> debbugs.gnu.org>; Sat, 08 May 2010 01:33:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:content-type; bh=d2r/pc5WLq+Akb/yJqTvUyFl5Aq6sE8cnH413HuqI+M=;
	b=g7oYrZ/SKw4Jf2Y4myuMj5SSB061TvAZafZux47bzGozVLsA5R9fLdFF0MP5USj4Db
	xgFpawATM8m4+z4P8JU0U5vY1Bi4jWPKKdw8YwTJnUyuV08kd1q5fh24u8FzWe/yA+p2
	sDw7LqH64UMU2lDislI1DDEbGvDFg0fsoyYL8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type;
	b=JAf9x6ZDD2bCd0LMwM+j9bcchsKJkNnAnF/dtgVFSToMVpX367pSgv1u5MiE5QJWqp
	oP6VOS8PEkERpIpydb4pX5Di90tYndJaroc6O0C4fljpSea5bRHs3fzHgxmWvbcQ683A
	qgVGB+UNmquq8WMRREu/60p+ycyiaZuHJ8WBk=
Received: by 10.103.81.29 with SMTP id i29mr547716mul.109.1273307593357;
	Sat, 08 May 2010 01:33:13 -0700 (PDT)
Received: from [192.168.2.101] (f054098070.adsl.alicedsl.de [78.54.98.70])
	by mx.google.com with ESMTPS id i5sm11718909mue.19.2010.05.08.01.33.09
	(version=SSLv3 cipher=RC4-MD5); Sat, 08 May 2010 01:33:10 -0700 (PDT)
Message-ID: <4BE521C4.7040202@HIDDEN>
Date: Sat, 08 May 2010 10:33:08 +0200
From: "F. Alexander Njemz" <f.alexander.njemz@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.9pre) Gecko/20100217 Shredder/3.0.3pre
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#6132: bug in date: --rfc-3339=TIMESPEC option doesn't print
	'T'
References: <4BE414E1.5010607@HIDDEN> <4BE437F7.4040101@HIDDEN>
In-Reply-To: <4BE437F7.4040101@HIDDEN>
Content-Type: multipart/mixed; boundary="------------050006070902060509090203"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 6132
X-Mailman-Approved-At: Sat, 08 May 2010 06:19:07 -0400
Cc: 6132 <at> debbugs.gnu.org,
	"F. Alexander Njemz" <f.alexander.njemz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.1 (/)

This is a multi-part message in MIME format.
--------------050006070902060509090203
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 05/07/2010 05:55 PM, Eric Blake wrote:
> On 05/07/2010 07:25 AM, F. Alexander Njemz wrote:
>    
>> Hi,
>>
>> as evidenced here [1] the slightly ambiguous wording in the RFC 3339 [2]
>> seems to be the reason that the date utility using the
>> --rfc3339=TIMESPEC switch formats the date with a space instead of a 'T'.
>>
>> I was confused as well, so I took the liberty to mail the authors of the
>> RFC in question. I attached the reply from Mr. Klyne.
>>
>> There is also a patch attached.
>>      
> Thanks for the report, and also for the patch.  However, I'm reluctant
> to create a date format that we cannot then reparse.  So before we apply
> this patch, we would first need a patch to gnulib's getdate.y that
> allows parsing of an rfc3339 style with a 'T' instead of a space.
>
>    


Hi Mr. Blake, hi mailing list,

I'm looking into getdate.y.
Mr. Newman has replied as well (see attachment).

I don't think Mr. Newman's mail applies to the date command, since IMHO 
date returns a
single field.

What do you think?

Regards,

F. Alexander Njemz

--------------050006070902060509090203
Content-Type: message/rfc822;
 name="rfc3339 is the T mandatory?.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="rfc3339 is the T mandatory?.eml"

Return-Path: <chris.newman@HIDDEN>
Received: from mailhost.informatik.uni-hamburg.de ([unix socket])
	 by mailhost (Cyrus v2.3.16) with LMTPA;
	 Fri, 07 May 2010 23:53:38 +0200
X-Sieve: CMU Sieve 2.3
Received: from localhost (localhost [127.0.0.1])
	by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTP id 745CDC6D
	for <8njemz@HIDDEN>; Fri,  7 May 2010 23:53:38 +0200 (CEST)
X-Virus-Scanned: amavisd-new at informatik.uni-hamburg.de
Received: from mailhost.informatik.uni-hamburg.de ([127.0.0.1])
	by localhost (mailhost.informatik.uni-hamburg.de [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id wUFkFt-24mLi for <8njemz@HIDDEN>;
	Fri,  7 May 2010 23:53:35 +0200 (CEST)
X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 DSBL_ORG=SKIP(0) CL_IP_EQ_HELO_MX=-3.1 (check from: .oracle. - helo: .brmea-mail-4.sun. - helo-domain: .sun.)  FROM/MX_MATCHES_NOT_HELO(DOMAIN)=1; rate: -6.6
Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36])
	by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTP id 9D73FC6C
	for <8njemz@HIDDEN>; Fri,  7 May 2010 23:53:32 +0200 (CEST)
Received: from fe-amer-09.sun.com ([192.18.109.79])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o47LrUuW015675
	for <8njemz@HIDDEN>; Fri, 7 May 2010 21:53:31 GMT
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-disposition: inline
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 id <0L2200L00KCJKJ00@HIDDEN> for 8njemz@HIDDEN;
 Fri, 07 May 2010 15:53:30 -0600 (MDT)
Received: from [192.168.15.3] ([unknown] [10.1.110.5])
 by mail-amer.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit
 (built Jul  2 2009)) with ESMTPSA id <0L2200CMTKT4JD80@HIDDEN>; Fri,
 07 May 2010 15:53:30 -0600 (MDT)
Date: Fri, 07 May 2010 14:53:27 -0700
From: Chris Newman <chris.newman@HIDDEN>
Subject: Re: rfc3339 is the T mandatory?
In-reply-to: <4BE40215.1090907@HIDDEN>
Sender: Chris.Newman@HIDDEN
To: Graham Klyne <GK@HIDDEN>,
        "F. Alexander Njemz" <8njemz@HIDDEN>
Cc: gk-wk02-web@HIDDEN
Message-id: <5036868D88F5C8E7C4CE8A57@96B2F16665FF96BAE59E9B90>
X-Mailer: Mulberry/4.0.8 (Mac OS X)
References: <4BE3DB82.1020503@HIDDEN>
 <4BE40215.1090907@HIDDEN>

If you're representing the date and time as a single field, then the "T" is 
necessary for compliance with RFC 3339 as Graham stated.

If you're using a multi-field representation where date and time are 
separate fields, then the field delimiter depends on your higher level 
field-encoding format.  In this case you would reference the full-date and 
full-time syntax elements from section 5.6 separately (instead of 
referencing the date-time syntax) and would be compliant with RFC 3339 if 
you were compliant with those elements.

		- Chris

--On May 7, 2010 13:05:41 +0100 Graham Klyne <GK@HIDDEN> wrote:
> In short: "yes"
>
> Per section 5.5, the intent in this draft was to specify a timestamp
> format using elements from and compatible with 8601, but eliminating as
> far as reasonable any variations that could make timestamp data harder to
> process. This includes making the 'T' mandatory in date+time values.
>
># g
> --
>
> F. Alexander Njemz wrote:
>> Dear Sirs,
>>
>> there seems to be some confusion about the interpretation of the
>> following passages
>> of RFC 3339:
>>     in section 5.6:
>>         NOTE: ISO 8601 defines date and time separated by "T".
>>         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.
>>     and in Appendix A:
>>         ISO 8601 states that the "T" may be omitted under some
>>         circumstances.  This grammar requires the "T" to avoid ambiguity.
>>
>> So, what I would like to ask is if the "T" is mandatory for RFC 3339
>> conformance or not?
>>
>> Thanks in advance.
>>
>> Regards,
>>
>> F. Alexander Njemz


--------------050006070902060509090203--




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#6132; Package coreutils. Full text available.

Message received at 6132 <at> debbugs.gnu.org:


Received: (at 6132) by debbugs.gnu.org; 7 May 2010 15:55:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 07 11:55:52 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OAPu3-0007yS-Qk
	for submit <at> debbugs.gnu.org; Fri, 07 May 2010 11:55:52 -0400
Received: from mx1.redhat.com ([209.132.183.28])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eblake@HIDDEN>) id 1OAPu0-0007yN-BU
	for 6132 <at> debbugs.gnu.org; Fri, 07 May 2010 11:55:49 -0400
Received: from int-mx04.intmail.prod.int.phx2.redhat.com
	(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
	by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o47FtjAr013638
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 7 May 2010 11:55:45 -0400
Received: from [10.3.225.77] (vpn-225-77.phx2.redhat.com [10.3.225.77])
	by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id o47FtigN028578; Fri, 7 May 2010 11:55:45 -0400
Message-ID: <4BE437F7.4040101@HIDDEN>
Date: Fri, 07 May 2010 09:55:35 -0600
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1
	Mnenhy/0.8.2 Thunderbird/3.0.4
MIME-Version: 1.0
To: "F. Alexander Njemz" <f.alexander.njemz@HIDDEN>
Subject: Re: bug#6132: bug in date: --rfc-3339=TIMESPEC option doesn't print
	'T'
References: <4BE414E1.5010607@HIDDEN>
In-Reply-To: <4BE414E1.5010607@HIDDEN>
X-Enigmail-Version: 1.0.1
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig592B81B0650EE11A97469474"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
X-Spam-Score: -9.9 (---------)
X-Debbugs-Envelope-To: 6132
Cc: 6132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -9.9 (---------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig592B81B0650EE11A97469474
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 05/07/2010 07:25 AM, F. Alexander Njemz wrote:
> Hi,
>=20
> as evidenced here [1] the slightly ambiguous wording in the RFC 3339 [2=
]
> seems to be the reason that the date utility using the
> --rfc3339=3DTIMESPEC switch formats the date with a space instead of a =
'T'.
>=20
> I was confused as well, so I took the liberty to mail the authors of th=
e
> RFC in question. I attached the reply from Mr. Klyne.
>=20
> There is also a patch attached.

Thanks for the report, and also for the patch.  However, I'm reluctant
to create a date format that we cannot then reparse.  So before we apply
this patch, we would first need a patch to gnulib's getdate.y that
allows parsing of an rfc3339 style with a 'T' instead of a space.

--=20
Eric Blake   eblake@HIDDEN    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig592B81B0650EE11A97469474
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJL5Df3AAoJEKeha0olJ0NqfMsH/2U2aRgChn9uWGbP83lfUWKR
yaPNgI16fzhisduurFSYctbURo1q2Mwex2BAWhSO5dEt9aVVMIUGOTZUJOB+BP1+
7K3jxe4NrQqWVuBvVPKL9LbdUIZ4HhWhSc0r5NrHnIfLR+RB+QtUUu0BKK5kh8Rj
Xq0hCKJ8NN13+97pXDsjRYZcX9KQR/X5EzNhagUffvQBva+Rk0gB8GyocTO7Z9ZT
HWS1/ftzYIiyix1OVUjFUWxPLXiC8MS+175EHRSH0zHq//TEZF9bJ06f2+u0x7Ce
TKwULely1a8udCT498qf8BsfR73DbloBQ/flKboJQSGGZpsPVCcTz8G5qo/ThMM=
=xcX1
-----END PGP SIGNATURE-----

--------------enig592B81B0650EE11A97469474--




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#6132; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 May 2010 15:07:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 07 11:07:57 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OAP9g-0007c5-UM
	for submit <at> debbugs.gnu.org; Fri, 07 May 2010 11:07:57 -0400
Received: from mx10.gnu.org ([199.232.76.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <f.alexander.njemz@HIDDEN>)
	id 1OANZH-0006qF-VD
	for submit <at> debbugs.gnu.org; Fri, 07 May 2010 09:26:17 -0400
Received: from lists.gnu.org ([199.232.76.165]:54819)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <f.alexander.njemz@HIDDEN>)
	id 1OANZF-0004gP-4C
	for submit <at> debbugs.gnu.org; Fri, 07 May 2010 09:26:13 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1OANZD-0002Sy-Tq
	for bug-coreutils@HIDDEN; Fri, 07 May 2010 09:26:12 -0400
Received: from [140.186.70.92] (port=46997 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1OANZ5-0005ra-10
	for bug-coreutils@HIDDEN; Fri, 07 May 2010 09:26:11 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DEAR_SOMETHING,
	FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <f.alexander.njemz@HIDDEN>)
	id 1OANZ0-0005jf-46
	for bug-coreutils@HIDDEN; Fri, 07 May 2010 09:26:02 -0400
Received: from fg-out-1718.google.com ([72.14.220.155]:1598)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <f.alexander.njemz@HIDDEN>)
	id 1OANYz-0005ih-S2
	for bug-coreutils@HIDDEN; Fri, 07 May 2010 09:25:58 -0400
Received: by fg-out-1718.google.com with SMTP id e12so1117911fga.12
	for <bug-coreutils@HIDDEN>; Fri, 07 May 2010 06:25:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:subject:content-type;
	bh=PBN0AdFPBajeQ3ZUxW/HFqTUCvdChMEcgF56ocGEjXs=;
	b=WbA0TIMTGwsKLH8uuN7nvojPeoWxJ2L8IeXu7L0MqBpUoiWUKsvQdQnwf+ddw6lxyj
	ewcswJ4d8Ts53x7jCajQqjdfWxkmLm1obfF46wyknQe7JbyED8U40waH9tJimnfGKejr
	E28tzlkMCT11+DVk97Br9c8a9UlQXWKxfHAdM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type;
	b=ucScUIYZu8kOfOBpzPsQ+Y3dAVUVRpqrN8nOnQCKWDLZJwLNzXkFo3DLLZ4tIuBnyE
	QC/HoUlIMDiT7D3VEanMAJ5sFUMewZTA2273xLj90smn6PFE9J47nXFZkiMX++kWGUCG
	la0uvIrlIGV1kgWVyrQq0DOH+Na2QpDdC3hEc=
Received: by 10.87.53.28 with SMTP id f28mr3651066fgk.70.1273238755628;
	Fri, 07 May 2010 06:25:55 -0700 (PDT)
Received: from [192.168.2.101] (f054100023.adsl.alicedsl.de [78.54.100.23])
	by mx.google.com with ESMTPS id 18sm4183598fkq.4.2010.05.07.06.25.53
	(version=SSLv3 cipher=RC4-MD5); Fri, 07 May 2010 06:25:54 -0700 (PDT)
Message-ID: <4BE414E1.5010607@HIDDEN>
Date: Fri, 07 May 2010 15:25:53 +0200
From: "F. Alexander Njemz" <f.alexander.njemz@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.9pre) Gecko/20100217 Shredder/3.0.3pre
MIME-Version: 1.0
To: bug-coreutils@HIDDEN
Subject: bug in date: --rfc-3339=TIMESPEC option doesn't print 'T'
Content-Type: multipart/mixed; boundary="------------000000020305030605080401"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 07 May 2010 11:07:56 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

This is a multi-part message in MIME format.
--------------000000020305030605080401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

as evidenced here [1] the slightly ambiguous wording in the RFC 3339 [2]
seems to be the reason that the date utility using the 
--rfc3339=TIMESPEC switch formats the date with a space instead of a 'T'.

I was confused as well, so I took the liberty to mail the authors of the
RFC in question. I attached the reply from Mr. Klyne.

There is also a patch attached.


Regards,

F. Alexander Njemz




[1] http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00014.html

[2] http://www.ietf.org/rfc/rfc3339.txt


--------------000000020305030605080401
Content-Type: message/rfc822;
 name="rfc3339 is the T mandatory?.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="rfc3339 is the T mandatory?.eml"

Return-Path: <GK@HIDDEN>
Received: from mailhost.informatik.uni-hamburg.de ([unix socket])
	 by mailhost (Cyrus v2.3.16) with LMTPA;
	 Fri, 07 May 2010 14:31:46 +0200
X-Sieve: CMU Sieve 2.3
Received: from localhost (localhost [127.0.0.1])
	by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTP id B95B2710
	for <8njemz@HIDDEN>; Fri,  7 May 2010 14:31:46 +0200 (CEST)
X-Virus-Scanned: amavisd-new at informatik.uni-hamburg.de
Received: from mailhost.informatik.uni-hamburg.de ([127.0.0.1])
	by localhost (mailhost.informatik.uni-hamburg.de [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id zoF5bBiKU+a2 for <8njemz@HIDDEN>;
	Fri,  7 May 2010 14:31:44 +0200 (CEST)
X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 DSBL_ORG=ERR(0) CL_IP_EQ_HELO_IP=-2 (check from: .ninebynine. - helo: .fallback1.mail.ox. - helo-domain: .ox.)  FROM/MX_MATCHES_NOT_HELO(DOMAIN)=1; rate: -5.5
Received: from fallback1.mail.ox.ac.uk (fallback1.mail.ox.ac.uk [163.1.2.175])
	by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTP id 22FA570F
	for <8njemz@HIDDEN>; Fri,  7 May 2010 14:31:37 +0200 (CEST)
Received: from relay6.mail.ox.ac.uk ([163.1.2.167])
	by fallback1.mail.ox.ac.uk with esmtp (Exim 4.69)
	(envelope-from <GK@HIDDEN>)
	id 1OAMiO-0002gw-55; Fri, 07 May 2010 13:31:36 +0100
Received: from smtp0.mail.ox.ac.uk ([129.67.1.205])
	by relay6.mail.ox.ac.uk with esmtp (Exim 4.71)
	(envelope-from <GK@HIDDEN>)
	id 1OAMiH-0007WK-LH; Fri, 07 May 2010 13:31:29 +0100
Received: from gklyne.plus.com ([80.229.154.156] helo=Eskarina.local)
	by smtp0.mail.ox.ac.uk with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.69)
	(envelope-from <GK@HIDDEN>)
	id 1OAMiH-0008S9-1J; Fri, 07 May 2010 13:31:29 +0100
Message-ID: <4BE40215.1090907@HIDDEN>
Date: Fri, 07 May 2010 13:05:41 +0100
From: Graham Klyne <GK@HIDDEN>
User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228)
MIME-Version: 1.0
To: "F. Alexander Njemz" <8njemz@HIDDEN>
CC: gk-wk02-web@HIDDEN, chris.newman@HIDDEN
Subject: Re: rfc3339 is the T mandatory?
References: <4BE3DB82.1020503@HIDDEN>
In-Reply-To: <4BE3DB82.1020503@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Oxford-Username: zool0635

In short: "yes"

Per section 5.5, the intent in this draft was to specify a timestamp format 
using elements from and compatible with 8601, but eliminating as far as 
reasonable any variations that could make timestamp data harder to process. 
This includes making the 'T' mandatory in date+time values.

#g
--

F. Alexander Njemz wrote:
> Dear Sirs,
> 
> there seems to be some confusion about the interpretation of the 
> following passages
> of RFC 3339:
>     in section 5.6:
>         NOTE: ISO 8601 defines date and time separated by "T".
>         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.
>     and in Appendix A:
>         ISO 8601 states that the "T" may be omitted under some
>         circumstances.  This grammar requires the "T" to avoid ambiguity.
> 
> So, what I would like to ask is if the "T" is mandatory for RFC 3339 
> conformance or not?
> 
> Thanks in advance.
> 
> Regards,
> 
> F. Alexander Njemz
> 



--------------000000020305030605080401
Content-Type: text/plain;
 name="date-rfc-3339-DIFF"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="date-rfc-3339-DIFF"

From ad52a8983b8bc3c5a1808e9ed2bec9930e9c8210 Mon Sep 17 00:00:00 2001
From: F. Alexander Njemz <f.alexander.njemz@HIDDEN>
Date: Fri, 7 May 2010 10:55:36 +0200
Subject: [PATCH] date: fixed rfc-3339 format strings

* src/date.c (main): Insert a 'T' between date and time in rfc-3339
format strings as specified by the rfc.
---
 src/date.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/date.c b/src/date.c
index c39adb1..daeaf0d 100644
--- a/src/date.c
+++ b/src/date.c
@@ -343,8 +343,8 @@ main (int argc, char **argv)
             static char const rfc_3339_format[][32] =
               {
                 "%Y-%m-%d",
-                "%Y-%m-%d %H:%M:%S%:z",
-                "%Y-%m-%d %H:%M:%S.%N%:z"
+                "%Y-%m-%dT%H:%M:%S%:z",
+                "%Y-%m-%dT%H:%M:%S.%N%:z"
               };
             enum Time_spec i =
               XARGMATCH ("--rfc-3339", optarg,
-- 
1.7.0.4



--------------000000020305030605080401--





Acknowledgement sent to "F. Alexander Njemz" <f.alexander.njemz@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#6132; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 24 Oct 2018 22:00:03 UTC

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