Page MenuHomePhabricator

Support +00:00 and -00:00 in xsd:dateTime
Closed, ResolvedPublic

Description

WikibaseDate exclusively handles the UTC time zone, i.e., the Z character (cf. W3C specs):
https://github.com/wikimedia/wikidata-query-rdf/blob/master/common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java#L30

This may conflict with data serialized through other RDF libraries.
For instance, Python rdflib automatically translates Z into +00:00, which prevents proper ingestion into Blazegraph, due to:
https://github.com/wikimedia/wikidata-query-rdf/blob/master/common/src/main/java/org/wikidata/query/rdf/common/WikibaseDate.java#L46

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev triaged this task as Medium priority.Nov 10 2017, 12:14 AM
Smalyshev subscribed.

Supporting +00:00 would be easy. Supporting other TZs a bit harder I imagine.

Change 392931 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[wikidata/query/rdf@master] Support 00:00 as timezone

https://gerrit.wikimedia.org/r/392931

Change 392931 merged by jenkins-bot:
[wikidata/query/rdf@master] Support 00:00 as timezone

https://gerrit.wikimedia.org/r/392931

Smalyshev renamed this task from Support time zones in xsd:dateTime to Support +00:00 and -00:00 in xsd:dateTime.Nov 27 2017, 6:12 PM

Support for +00:00 and -00:00 implemented. All the rest in not currently planned but if needed, let's create new ticket with use case.

Smalyshev claimed this task.