W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2002

RE: Dates and Times in XML Schema Part 2

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Tue, 19 Feb 2002 18:25:08 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210602679C54@daemsg02.software-ag.de>
To: "'Ashok Malhotra'" <ashokma@microsoft.com>, "Kay, Michael" <Michael.Kay@softwareag.com>, www-xml-schema-comments@w3.org
Cc: w3c-query-operators@w3.org


> 3. Schema-2 states that "The ˇvalue spaceˇ of dateTime is the space of
> Combinations of date and time of day values as defined in § 
> 5.4 of [ISO
> 8601]." The implication of this is that 2002-02-02T12:00:00Z 
> is a distinct
> value in the value space from 2002-02-02T07:00:00-05:00. But 
> if this is so,
> then the canonical lexical representation (which is always in UTC with
> timezone designator Z) cannot represent all values in the value space.
> [AM] The language may not be as clear as possible but the 
> value space represents instances of dateTime regardless of 
> the timezone used.  Thus, in your example above, where you 
> meant to indicate two lexical representations of the same 
> instant of time, both would map to the same value in the 
> value space.  

If this is so, it's extremely important that we understand its implications.


It means that if an XML document containing 2002-02-02T07:00:00-05:00 is
supplied as input to an identity transformation, the output document will
say 2002-02-02T12:00:00Z. 

It also means that if we have a function to extract the "hours" part of this
dateTime, the result will be 12, not 7 as the user might expect. 

And it means that the function xf:get-timezone-from-dateTime(), in the
current version of XQuery Functions and Operators, is meaningless. It is
supposed to return a string representing the timezone component of the
supplied dateTime, but from what you say above, the value space of dateTime
does not include a timezone. 

This is different from the way timezones are handled in SQL, where the
timezone is retained as part of the value.

Mike Kay
Received on Tuesday, 19 February 2002 12:25:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:33 UTC