On 08/04/14 01:38, Holger Knublauch wrote:
Hi all,

we noticed a change in behavior between the recent Jena versions.

Between which versions?


SELECT *
WHERE {
     BIND("2014-04-08T00:00:00"^^xsd:dateTime AS ?time0) .
     BIND("2014-04-08T00:00:00+10:00"^^xsd:dateTime AS ?time1) .
     BIND(xsd:date(?time0) AS ?date0) .
     BIND(xsd:date(?time1) AS ?date1) .
     BIND(?date0 > ?date1 AS ?compare)
}

With Jena 2.11 ?compare is unbound, indicating that it is impossible to
compare times or dates that have a different time zone.

"2014-04-08T00:00:00"^^xsd:dateTime does not have a timezone.

No timezone is not the same as different timezone.

Is this the expected behavior? Shouldn't it in theory figure out the
time zones itself (e.g. by aligning all to a universal time zone)
instead of failing?

See the XSD F&O spec for comparing dateTimes with and without timezones.

14 is a magic number.

What would be a work-around to do this "manually" for data that is
stored in mixed time zones?

Be careful.

The problem is that the data publisher and the query engine (and indeed the client asking the query) may be in different timezones so defaulting a timezone does not make sense on the web.

There is nothing special about Z.

        Andy

PS Please use the [email protected] mailing list, not the incubator one.


Thanks
Holger


Reply via email to