date and ISO-8601
Denys Vlasenko
vda.linux at googlemail.com
Tue Nov 25 22:32:15 UTC 2008
On Thursday 25 September 2008 19:09, Piotr Grudzinski wrote:
> Here are some problems with the date applet and ISO-8601 as of BB 1.12.1
>
> 1. Colon separator - use it (extended format) or not (basic format). BB seems to mix both:
>
> # date -Iseconds
> 2008-11-25T12:46:43-0500
>
> There is a missing colon in -0500 (the difference between local time and UTC).
coreutils does this:
bash-3.2# /usr/bin/date --version
date (GNU coreutils) 6.9
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
bash-3.2# /usr/bin/date -Iseconds
2008-11-25T23:27:25+0100
> 2. A 'Z' should be used to designate UTC:
>
> # date -u -Iseconds
> 2008-11-25T18:05:27UTC
>
> so it should be: 2008-11-25T18:05:27Z
coreutild does not do it either:
bash-3.2# /usr/bin/date -u -Iseconds
2008-11-25T22:27:38+0000
so it seems to be not such a big problem as of now.
--
vda
More information about the busybox
mailing list