RDFLib/rdflib — Issue #147: Timestamps with timezone information are not parsed
Author: gjhiggins
Created: 2012-02-20 08:33:49+00:00
State: open

christop...@gmail.com, 2011-01-16T23:31:08.000Z

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

Comment 1 by vfaronov
Issue #118 is the same as this one.

Comment 2 by gromgull
Applied patch in r1904 (but messed up commit message)