bug-coreutils
[Top][All Lists]
Advanced

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

Re: XML-like date/time support ?


From: Philip Rowlands
Subject: Re: XML-like date/time support ?
Date: Sun, 8 Jan 2006 19:35:36 +0000 (GMT)

On Sun, 8 Jan 2006, Nicolas Mailhot wrote:

The XML folks have defined a single common international date/time
format people can actually use :
http://www.w3.org/TR/NOTE-datetime

The W3 consortium has received a proposal, from Reuters, for a subset of ISO 8601, which has been marked "This document is a NOTE made available by the W3 Consortium for discussion only. This indicates no endorsement of its content..."

Unfortunately it can not be produced by shell scripts using the "date" command.

The full format used in the note, save the fractional part of a second, can be specified as:

$ date '+%Y-%m-%dT%H-%M-%S%:z'
2006-01-08T19-29-44+00:00

(Note to maintainers - %Z does not appear separately in the 5.93 manpage. I don't know enough texinfo or troff to suggest a fix, sorry.)

Would it be possible to enhance date and :
- add a formatting flag to output the timezone in value (%z ?)
- add a formatting shorthand for full date/time in w3c format ?

I suspect you are using an older version of "date" which lacks the timezone specifiers %z, %:z, %Z etc.


Cheers,
Phil




reply via email to

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