sobjects/parsers.py
branchstable
changeset 7957 5da7ede69063
parent 7932 2ad26cc3b5c6
child 7995 9a9f35ef418c
--- a/sobjects/parsers.py	Fri Oct 14 09:04:39 2011 +0200
+++ b/sobjects/parsers.py	Fri Oct 14 13:50:46 2011 +0200
@@ -61,9 +61,14 @@
         ustr = ustr.split('.',1)[0]
     return datetime.strptime(ustr, '%Y-%m-%d %H:%M:%S')
 DEFAULT_CONVERTERS['Datetime'] = convert_datetime
+# XXX handle timezone, though this will be enough as TZDatetime are
+# serialized without time zone by default (UTC time). See
+# cw.web.views.xmlrss.SERIALIZERS.
+DEFAULT_CONVERTERS['TZDatetime'] = convert_datetime
 def convert_time(ustr):
     return totime(datetime.strptime(ustr, '%H:%M:%S'))
 DEFAULT_CONVERTERS['Time'] = convert_time
+DEFAULT_CONVERTERS['TZTime'] = convert_time
 def convert_interval(ustr):
     return time(seconds=int(ustr))
 DEFAULT_CONVERTERS['Interval'] = convert_interval