[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML-like date/time support ?
From: |
Paul Eggert |
Subject: |
Re: XML-like date/time support ? |
Date: |
Sun, 08 Jan 2006 16:24:26 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Nicolas Mailhot <address@hidden> writes:
> The XML folks have defined a single common international date/time
> format
I just looked at <http://www.w3.org/TR/NOTE-datetime> and it appears that
(1) There are 9 formats, not 1.
(2) There is no way to represent a leap second. This is not normally
a problem, since few coreutils hosts handle leap seconds
correctly, but for those hosts that do I suppose we can just
ignore the XML standard.
(3) There is no way to represent time zone offsets that are not a
multiple of a minute, or years before 0000 or after 9999, or a few
other things like that. But I suppose they are just inheriting
these limitations from ISO 8601.
I suppose we can add an option for this, with an operand to specify
which of the 9 formats you want. Something like the existing "date
--rfc-3339=TIMESPEC".
But I'm a bit leery of calling it "date --xml=TIMESPEC", or "date
--w3c=TIMESPEC". These guys might change their mind some day in the
future. Is there some more-specific name we can use, that XML folks
would recognize?
Also, I see a slightly different set of rules in
<http://www.w3.org/TR/xmlschema-2/> (2004-10-28), section 3.2.7. For
example, it says that a canonical representation cannot use the time
zone "+00:00", and that fractional seconds cannot end in "0", and that
the time zone is optional. What gives? This document looks far more
official: does it supersede the document you mentioned? Should "date"
output a canonical representation?
I guess that might mean that there are 10 XML formats instead of 9?
Or even more, if non-canonical formats are desired? Sorry, I'm a bit
lost here.
- XML-like date/time support ?, Nicolas Mailhot, 2006/01/08
- Re: XML-like date/time support ?,
Paul Eggert <=
- Re: XML-like date/time support ?, Nicolas Mailhot, 2006/01/08
- Re: XML-like date/time support ?, Paul Eggert, 2006/01/08
- Re: XML-like date/time support ?, Nicolas Mailhot, 2006/01/09
- Re: XML-like date/time support ?, Richard Dawe, 2006/01/10
- Re: XML-like date/time support ?, Paul Eggert, 2006/01/10
- Re: XML-like date/time support ?, Nicolas Mailhot, 2006/01/11