W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2008

Re: error in spec for xs:date

From: Dave Peterson <davep@iit.edu>
Date: Mon, 20 Oct 2008 23:19:15 -0400
Message-Id: <a06240801c522f1b771b6@[192.168.1.106]>
To: Andrew Salamatov <andrewsa@exchange.microsoft.com>, "www-xml-schema-comments@w3.org" <www-xml-schema-comments@w3.org>
At 8:29 PM +0000 2008-10-10, Andrew Salamatov wrote:
>Hi,
>I noticed a contradiction in the spec in section 
>"3.2.9 date". The spec reads "Š the first moment 
>of 2002-10-10+13:00 is 2002-10-10T00:00:00+13, 
>which is 2002-10-09T11:00:00ZŠ"
>This sentence implies that to get the UTC 
>equivalent first moment of "2002-10-10+13", the 
>equation is 2002-10-10T00:00:00Z - 13:00 = 
>2002-10-09T11:00:00Z (or the formula is midnight 
>of that date in UTC - hours offset = first 
>moment in UTC).
>However, later on in that section we have "For 
>example, 2002-10-10-05:00 begins during 
>2002-10-09ZŠ" This is a contradiction, because 
>according to the above formula, we would have 
>2002-10-10T00:00:00Z - (-05:00) = 
>2002-10-10T05:00:00Z. Thus, 2002-10-10-05:00 
>would begin actually on 2002-10-10Z. Hence the 
>contradiction. So which is correct and what is 
>the correct formula to calculate when the first 
>moment is in UTC, given a timezone offsetted 
>xs:date?

You appear to be commenting on the currently official Schema Recommendation,
1.0 2E.  Since publication of that Recommendation in 2004, the W3C Schema
Working Group has been trying to eliminate problems like the one you cite,
and to add some requested additional new features; this effort is the
development of version/revision 1.1 .  (I can tell you were looking at
1.0 because the date datatype is described in section 3.2.10 in even the
first publicly available draft of 1.1 .)  The most recent public draft is
a "Last Call Working Draft" available at http://www.w3.org/TR/xmlschema11-2/ .
We are pushing this Revision 1.1 toward final acceptance and publication as
an official W3C Recommendation as quickly as we can.

The section you mention was rewritten and incorporated into a publicly
available draft in Jan 2006; in that draft the contradiction was eliminated.

For the record, the first of your two contradictory examples is correct.
One subtracts the time zone offset (a more proper term than timezone) from
local to get UTC.  One thing the 1.1 revision does is to cause the various
date/time datatypes' values to retain their time zone offset information,
so even extreme offsets (more than 12 hours from UTC) are remembered.
I believe this actually makes the date/time datatypes easier to understand
intuitively:  no more worry about "original" vs "recoverable" time zone
offsets.

Hope this helps.  (I'd love to see a Microsoft representative on the
Schema Working Group of W3C once again.)
-- 
Dave Peterson
SGMLWorks!

davep@iit.edu
Received on Tuesday, 21 October 2008 03:20:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:16 GMT