gjhiggins/rdflib — Issue #156: Timestamps with timezone information are not parsed
Author: gjhiggins
Created: 2011-10-19 01:32:15+00:00
State: open

Originally filed by christop...@gmail.com on 2011-01-16T23:31:08

A literal holding a timestamp with timezone information in the form of e.g. +01:00 will not transform to a Python datetime object under toPython()

>>> Literal("2011-01-16T19:39:18.239743+01:00", datatype=URIRef('http://www.w3.org/2001/XMLSchema#dateTime')).toPython()
rdflib.term.Literal(u'2011-01-16T19:39:18.239743+01:00', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#dateTime'))

See attched patch for a simple workaround.
This patch builds on the patch in issue #153