coreutils: bug in date --iso-8601={seconds,ns}?

2008-08-22 Thread Johannes Truschnigg
Dear GNU maintainer/team/email-dude,

in thre process of writing an Atom-feed-generator in bash, I discovered what 
MIGHT be a bug/documentation misinterpretation in GNU date's --iso-8601 
switch when invoked with ns or seconds as a parameter.

RFC3339 and some documents regarding ISO 8601 I could find on the web quickly 
seem to suggest that the time-offset component of the output should match the 
regex /\d\d:\d\d/; date, however, matches /\d\d\d\d/.

As said, I don't know if the actual ISO 8601 standard specifies that as fair 
game, as I don't know where I could take a look at it - but it might not harm 
investigating if you aren't completely sure about the correct behaviour 
either...

Anyway, thanks for taking the time and making coreutils available to us mere 
mortals in the first place - happy hacking! :-)

-- 
with best regards:
- Johannes Truschnigg ( [EMAIL PROTECTED] )

www: http://johannes.truschnigg.info/
phone: +43 650 2 17
jabber: [EMAIL PROTECTED]

Please do not bother me with HTML-eMail or attachments. Thank you.


signature.asc
Description: This is a digitally signed message part.
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: coreutils: bug in date --iso-8601={seconds,ns}?

2008-08-22 Thread Philip Rowlands

On Fri, 22 Aug 2008, Johannes Truschnigg wrote:

in thre process of writing an Atom-feed-generator in bash, I discovered 
what MIGHT be a bug/documentation misinterpretation in GNU date's 
--iso-8601 switch when invoked with ns or seconds as a parameter.


--iso-8601 is deprecated since coreutils 5.90.


RFC3339 and some documents regarding ISO 8601 I could find on the web quickly
seem to suggest that the time-offset component of the output should match the
regex /\d\d:\d\d/; date, however, matches /\d\d\d\d/.


I think --rfc-3339=seconds will do what you want.


Cheers,
Phil


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils