[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [date] ISO-8601 date format
From: |
Bob Proulx |
Subject: |
Re: [date] ISO-8601 date format |
Date: |
Mon, 9 Oct 2006 09:55:09 -0600 |
User-agent: |
Mutt/1.5.9i |
JL Lacroix wrote:
> To convert a date into the full ISO-8601 format one can do this:
>
> $ date --iso-8601=seconds --date "sun oct 1 5:45:02PM"
The NEWS for the latest CVS says:
date accepts the new option --rfc-3339=TIMESPEC. The old --iso-8602 (-I)
option is deprecated; it still works, but new applications should avoid it.
date, du, ls, and pr's time formats now support new %:z, %::z, %:::z
specifiers for numeric time zone offsets like -07:00, -07:00:00, and -07.
So once you get updated to a 6.x release (>= 5.90 actually) then you
can start using the new --rfc-3339 option.
Paul, Shouldn't that be iso-8601 instead of iso-8602 in the above?
> But when we want to convert a ISO-8601 formated date into a man readable
> format:
> ...
> Obviously, the full ISO-8601 format is not accepted as date input format.
Basically fixed by the --rfc-3339 option for which you will need to
upgrade to a 6.x release. Until then you will need to process the
date format and reformat it before passing it back to date.
You may find this discussion useful.
http://lists.gnu.org/archive/html/bug-coreutils/2005-05/msg00098.html
Particularly this posting:
http://lists.gnu.org/archive/html/bug-coreutils/2005-07/msg00186.html
Bob