Manage microseconds in XML-RPC

review4021002
This commit is contained in:
Cédric Krier
2014-03-15 10:41:31 +01:00
parent 08a0f9df03
commit d91b37bf52
+3 -1
View File
@@ -40,6 +40,7 @@ def dump_time(self, value, write):
'hour': value.hour,
'minute': value.minute,
'second': value.second,
'microsecond': value.microsecond,
}
self.dump_struct(value, write)
@@ -60,7 +61,8 @@ def end_struct(self, data):
if dct['__class__'] == 'date':
dct = datetime.date(dct['year'], dct['month'], dct['day'])
elif dct['__class__'] == 'time':
dct = datetime.time(dct['hour'], dct['minute'], dct['second'])
dct = datetime.time(dct['hour'], dct['minute'], dct['second'],
dct['microsecond'])
elif dct['__class__'] == 'Decimal':
dct = Decimal(dct['decimal'])
self._stack[mark:] = [dct]