bug-coreutils
[Top][All Lists]
Advanced

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

Re: date -Iseconds isn't ISO 8601 / RFC 3339


From: Eric Blake
Subject: Re: date -Iseconds isn't ISO 8601 / RFC 3339
Date: Wed, 23 Mar 2005 17:28:48 +0000

> Needs a ":" in the middle of the timezone offset.
> 
> -Bennett

According to RFC 3339, the ISO 8601 grammar allows the ':' of a timezone offset 
to be optional, it is only RFC 3339 that requires it.  Furthermore, ISO C and 
POSIX both require that strftime()'s implementation of %z omit the ':'.  So we 
have a classic case of conflicting specifications.  But note that `date --help' 
and `info coreutils date' do not lie - they only claim compliance with ISO 8601 
and not with RFC 3339, and the -I option outputs the offset using %z.

At this point, you could try to raise the issue with POSIX, and try to get a 
new % specification added (how about %o for offset?) that is like %z but adds 
the ':' in the middle.  In the meantime, you could propose a patch to gnulib's 
lib/strftime.c that adds %o as a GNU extension.  Also, you could raise the 
issue with the IETF that RFC 3339 is not easily implementable with the current 
POSIX spec.

--
Eric Blake






reply via email to

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