Re: RE: Re: Timezones and xsd:dateTime/xsd:date

* Seaborne, Andy <andy.seaborne@hp.com> [2007-09-06 17:53+0100]
> 
> 
> 
> -------- Original Message --------
> > From: Eric Prud'hommeaux <mailto:eric@w3.org>
> > Date: 6 September 2007 17:21
> > 
> > I read this as saying that in *XQuery*
> >   "20070906T12:08"^^xsd:dateTime is always >
> > "20070906T12:07"^^xsd:dateTime (and "20070906"^^xsd:date is always >
> > "20070906"^^xsd:date)  
> 
> That is, no timezone info.
> 
> (Actually in ARQ "20070906"^^xsd:date = "20070906"^^xsd:date :-)
> 
> > 
> > [[
> > C.2 Dynamic Context Components
> > 
> > The following table describes how values are assigned to the various
> > components of the dynamic context. All these components are initialized
> > by mechanisms defined by the host language. For each component,
> > "global" indicates that the value of the component remains constant
> > throughout evaluation of the XPath expression, whereas "dynamic"
> > indicates that the value of the component can be modified by the
> > evaluation of subexpressions.      
> > 
> >                                    Dynamic Context Components
> > ┌──────────────────┬─────────────────────────────────────────────┐
> > │      Component   │                                 Scope       │
> > ├──────────────────┼─────────────────────────────────────────────┤
> > │Implicit timezone │global; must be initialized by implementation│
> > └──────────────────┴─────────────────────────────────────────────┘ ]]
> > --
> > http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-xp-evaluation-context-components
> > 
> > - so, there can be only one implicit timezone for the evaluation of a
> > query. 
> > 
> > I'd like to follow XQuery; will draft clarifying text after lunch.
> > 
> > Does that influence your interpretation Andy?
> 
> I'm following:
> http://www.w3.org/TR/xmlschema-2/#dateTime-order
> 
> The text you quote does not change my interpretation of the comparison text - it clarifies what happens in XPath/Xquery 
> 
> The comparisons both have no timezone so it's case B:

I see no reason to deviate from XQuery in this regard. I'd like to
follow XQuery's lead here and put this clarifying text above 11.3.1:

[[
xsd:dateTimes that have no timezone are given an implicit time, as defined by
<a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-timezone">XQuery</a>
]]

giving a timezone to all dateTime comparisons. I can't say what an
extended implementation does with xsd:date, but wouldn't want a test
case to lock us in to a behavoir that was inconsistent with XQuery
without discussing the trade-offs.

> [[
> B. If P and Q either both have a time zone or both do not have a time zone, compare P and Q field by field from the year field down to the second field, and return a result as soon as it can be determined.
> ]]
> 
> Cases C and D are the situation where one has a timezone, one does not.
> 
> (ARQ uses code from Apache Xerces to actually do the comparison - it can return INDETERMINATE).
> 
>  Andy
> 
> 
> --------------------------------------------
>   Hewlett-Packard Limited
>   Registered Office: Cain Road, Bracknell, Berks RG12 1HN
>   Registered No: 690597 England

-- 
-eric

office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
mobile: +1.617.599.3509

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Thursday, 6 September 2007 17:33:13 UTC