add timezone support to DateTime
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
New
|
Undecided
|
Unassigned |
Bug Description
storing of datetime objects with timezone information does not work, as an example see the attached script which fails with an ValueError:
python test_db.py
Traceback (most recent call last):
File "test_db.py", line 49, in <module>
print [i.date for i in db.store.
File "/usr/lib/
yield self._load_
File "/usr/lib/
return self._store.
File "/usr/lib/
return self._load_
File "/usr/lib/
self.
File "/usr/lib/
result.
File "/usr/lib/
variable.
File "/usr/lib/
new_value = self.parse_
File "/usr/lib/
_parse_
File "/usr/lib/
raise ValueError("Unknown time format: %r" % time_str)
ValueError: Unknown time format: u'12:30:40+00:00'
Thanks,
Markus
I worked around it by subclassing DateTime, maybe this helps you fixing this issue