- From: <bugzilla@wiggum.w3.org>
- Date: Fri, 09 Sep 2005 16:23:33 +0000
- To: www-xml-schema-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2129
Summary: R-140: dateTime order relation and leap seconds
Product: XML Schema
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: XSD Part 2: Datatypes
AssignedTo: cmsmcq@w3.org
ReportedBy: sandygao@ca.ibm.com
QAContact: www-xml-schema-comments@w3.org
Consider the dateTime of the last leap second:
1998-12-31T23:59:60Z (P)
This instant in time can also have the lexical representation of, for example,
1998-12-31T22:59:60-01:00 (Q)
Section 3.2.7.3 defines the algoritm for comparing two dateTimes as follows:
"A.Normalize P and Q. That is, if there is a timezone present, but it is not Z,
convert it to Z using the addition operation defined in Adding durations to
dateTimes (E)"
Now in our example P has a Z timezone, but Q doesn't, so we need to normalize Q
to Z using Appendix E. But E.1 says:
"Leap seconds are handled by the computation by treating them as overflows.
Essentially, a value of 60 seconds in S is treated as if it were a duration of
60 seconds added to S (with a zero seconds field). All calculations thereafter
use 60 seconds per minute."
This implies that Q is first mapped into:
1998-12-31T23:00:00-01:00
Then following the rest of algorithm in Appendix E, this will map into:
1999-01-01T00:00:00Z
Now comparing:
1998-12-31T23:59:60Z
and
1999-01-01T00:00:00Z
we find that
P < Q
But P and Q represent the same value. So we have a contradiction: two lexical
representations represent the same value, but the value represented by one
lexical representation is less than the value represented by the other lexical
representation.
See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0043.html
Received on Friday, 9 September 2005 16:23:50 UTC