W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2007

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

From: Eric Prud'hommeaux <eric@w3.org>
Date: Tue, 11 Sep 2007 10:09:37 -0400
To: "Seaborne, Andy" <andy.seaborne@hp.com>
Cc: Lee Feigenbaum <lee@thefigtrees.net>, RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-ID: <20070911140937.GQ30577@w3.org>
* 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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:37 GMT