SEBA-68 Fix rounding of enacted and policed timestamps
Change-Id: I64c4c8bee23785fe1d378a06b9933bd8827855fd
diff --git a/xos/synchronizers/new_base/apiaccessor.py b/xos/synchronizers/new_base/apiaccessor.py
index b1cf77b..a215e00 100644
--- a/xos/synchronizers/new_base/apiaccessor.py
+++ b/xos/synchronizers/new_base/apiaccessor.py
@@ -15,7 +15,6 @@
from modelaccessor import ModelAccessor
-import pytz
import datetime
import time
@@ -68,9 +67,7 @@
def now(self):
""" Return the current time for timestamping purposes """
- utc = pytz.utc
- now = datetime.datetime.utcnow().replace(tzinfo=utc)
- return time.mktime(now.timetuple())
+ return (datetime.datetime.utcnow()-datetime.datetime.fromtimestamp(0)).total_seconds()
def is_type(self, obj, name):
return obj._wrapped_class.__class__.__name__ == name