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

* Seaborne, Andy <andy.seaborne@hp.com> [2007-09-11 09:27+0100]
> Concrete example:
>
> P = "2006-09-10T09:00:00"^^xsd:dateTime
> Q = "2006-09-10T09:00:00Z"^^xsd:dateTime
>
> Is P = Q ?
>
> XMLSchema [1]   => Indeterminate (case D)
> F&O [2]         => false (because XMLSchema algorithm isn't true)
> XPath2 [3]      => true, if the default timezone is Z, else false
>
> 	Andy
>
> [1] http://www.w3.org/TR/xmlschema-2/#dateTime-order
> [2] http://www.w3.org/TR/xpath-functions/#func-dateTime-equal
> [3] http://www.w3.org/TR/xpath20/#dt-timezone

As you observe, the answer is dependent on the context's timezone. We
can test that by either extending the manifest to specify that (or
just say "all tests are evaluated at +9), or avoid the ambiguity by
testing for
  FILTER (?P = ?Q || ?P != ?Q)
which will ensure that the test does not produce an error.

Tests of two dateTimes with no timezone are trivally testable as they
will always have the same context (assuming folks feel as I do that we
should follow XQuery's lead).
-- 
-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 Tuesday, 11 September 2007 14:09:51 UTC