diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-01-10 13:50:48 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-01-10 13:50:48 +0100 |
| commit | 557feb950cb74656c92e59a62847c9e414c9b41f (patch) | |
| tree | 8b95618acf9659f7f5a6bc6d36e5b5090ce1ef68 /odoo/__init__.py | |
| parent | 63f732b9a10b9f13e7e5538a84a1d61dc6fb3ad8 (diff) | |
| parent | 482fd04167410885264d5903ea621682f5f917db (diff) | |
[MERGE] forward port branch 10.0 up to 482fd041674
Diffstat (limited to 'odoo/__init__.py')
| -rw-r--r-- | odoo/__init__.py | 13 |
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 |
