#
##############################################################################
-""" OpenERP core library.
+""" OpenERP core library..
"""
+
+import sys
+
+# Is the server running with gevent.
+evented = False
+if sys.modules.get("gevent") is not None:
+ evented = True
+
+
+# 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 openerp.cli.server was working.
+import os
+os.environ['TZ'] = 'UTC' # Set the timezone...
+import time # ... *then* import time.
+del os
+del time
+
# The hard-coded super-user id (a.k.a. administrator, or root user).
SUPERUSER_ID = 1
# its own copy of the data structure and we don't need to care about
# locks between threads.
multi_process = False
-# Is the server running with gevent.
-evented = False
def registry(database_name):
"""
"""
return modules.registry.RegistryManager.get(database_name)
-def new_registry(database_name):
- """
- Return the model registry for the given database. If the registry already
- existed, it is deleted and created again.
- """
- return modules.registry.RegistryManager.new(database_name)
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: