walidazizi / rdflib

Automatically exported from code.google.com/p/rdflib
Other
0 stars 0 forks source link

Timestamps with timezone information are not parsed #157

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

Original issue reported on code.google.com by christop...@gmail.com on 16 Jan 2011 at 11:31

Attachments:

GoogleCodeExporter commented 8 years ago
Issue #118 is the same as this one.

Original comment by vfaronov on 17 Jan 2011 at 2:14

GoogleCodeExporter commented 8 years ago
Applied patch in r1904 (but messed up commit message)

Original comment by gromgull on 28 Jan 2011 at 6:57