From 0139604c3473c0eb928e7220bc0ee3ead26ca389 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Sat, 11 Aug 2007 13:45:49 +0000 Subject: [PATCH] Disable the hack by vincent, because I now understand the consequence that it breaks the simulation due to divergency. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15614 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/patches/DateTimePatch.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/product/ERP5Type/patches/DateTimePatch.py b/product/ERP5Type/patches/DateTimePatch.py index 79784efc84..71b076f224 100644 --- a/product/ERP5Type/patches/DateTimePatch.py +++ b/product/ERP5Type/patches/DateTimePatch.py @@ -32,14 +32,19 @@ STATE_KEY = 'str' def DateTime__setstate__(self, state): if len(state) != 1 or STATE_KEY not in state: - # For backward compatibility self.__dict__.update(state) else: + # For backward compatibility self._parse_args(state[STATE_KEY]) DateTimeKlass.__setstate__ = DateTime__setstate__ -def DateTime__getstate__(self): - return {STATE_KEY: str(self)} - -DateTimeKlass.__getstate__ = DateTime__getstate__ +# This below is disabled, because this loses information at +# millisecond level, and it breaks the simulation due to +# divergency tests. I will not disable the above for backward +# compatibility. -yo +# +# def DateTime__getstate__(self): +# return {STATE_KEY: str(self)} +# +# DateTimeKlass.__getstate__ = DateTime__getstate__ -- 2.30.9