[CORD-2576] Not converting to timezones when parsing for redis
Change-Id: I5470b6c8b9816b12219cdb97be4aeb2cffafe884
diff --git a/xos/core/models/attic/xosbase_header.py b/xos/core/models/attic/xosbase_header.py
index 13e628a..0923c04 100644
--- a/xos/core/models/attic/xosbase_header.py
+++ b/xos/core/models/attic/xosbase_header.py
@@ -16,6 +16,7 @@
import datetime
import time
+import calendar
import json
import pytz
import inspect
@@ -48,7 +49,7 @@
# json can't serialize DstTzInfo
return str(obj)
elif hasattr(obj, 'timetuple'):
- return time.mktime(obj.timetuple())
+ return calendar.timegm(obj.timetuple())
else:
return obj
diff --git a/xos/core/models/user.py b/xos/core/models/user.py
index 83595f9..47c69e2 100644
--- a/xos/core/models/user.py
+++ b/xos/core/models/user.py
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-import datetime
import hashlib
import os
import sys