From d91b37bf524c5cb39d9a5c8849f7476c1ada7e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 15 Mar 2014 10:41:31 +0100 Subject: [PATCH] Manage microseconds in XML-RPC review4021002 --- proteus/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proteus/config.py b/proteus/config.py index a71e9b719f..5b218d37ce 100644 --- a/proteus/config.py +++ b/proteus/config.py @@ -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]