summaryrefslogtreecommitdiff
path: root/odoo/__init__.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-01-10 13:50:48 +0100
committerChristophe Simonis <chs@odoo.com>2017-01-10 13:50:48 +0100
commit557feb950cb74656c92e59a62847c9e414c9b41f (patch)
tree8b95618acf9659f7f5a6bc6d36e5b5090ce1ef68 /odoo/__init__.py
parent63f732b9a10b9f13e7e5538a84a1d61dc6fb3ad8 (diff)
parent482fd04167410885264d5903ea621682f5f917db (diff)
[MERGE] forward port branch 10.0 up to 482fd041674
Diffstat (limited to 'odoo/__init__.py')
-rw-r--r--odoo/__init__.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/odoo/__init__.py b/odoo/__init__.py
index 69e10a4c011..dbf17c02200 100644
--- a/odoo/__init__.py
+++ b/odoo/__init__.py
@@ -27,15 +27,12 @@ multi_process = False
#----------------------------------------------------------
# libc UTC hack
#----------------------------------------------------------
-# Make sure the OpenERP server runs in UTC. This is especially necessary
-# under Windows as under Linux it seems the real import of time is
-# sufficiently deferred so that setting the TZ environment variable
-# in odoo.cli.server was working.
+# Make sure the OpenERP server runs in UTC.
import os
-os.environ['TZ'] = 'UTC' # Set the timezone...
-import time # ... *then* import time.
-del os
-del time
+os.environ['TZ'] = 'UTC' # Set the timezone
+import time
+if hasattr(time, 'tzset'):
+ time.tzset()
#----------------------------------------------------------
# Shortcuts