[bitbake-devel] [PATCH 94/94] bitbake: webhob: do not set timezones

Alex DAMIAN alexandru.damian at intel.com
Tue Sep 24 16:53:03 UTC 2013


From: Alexandru DAMIAN <alexandru.damian at intel.com>

Preventing webhob setting a default timezone.
As such, it will always use the current time
for the local computer.

[YOCTO #5186]

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 bitbake/lib/webhob/whbmain/settings.py | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/bitbake/lib/webhob/whbmain/settings.py b/bitbake/lib/webhob/whbmain/settings.py
index d470328..c5222e5 100644
--- a/bitbake/lib/webhob/whbmain/settings.py
+++ b/bitbake/lib/webhob/whbmain/settings.py
@@ -20,16 +20,6 @@ DATABASES = {
     }
 }
 
-# If we're using sqlite, we need to tweak the performance a bit
-from django.db.backends.signals import connection_created
-def activate_synchronous_off(sender, connection, **kwargs):
-    if connection.vendor == 'sqlite':
-        cursor = connection.cursor()
-        cursor.execute('PRAGMA synchronous = 0;')
-connection_created.connect(activate_synchronous_off)
-#
-
-
 # Hosts/domain names that are valid for this site; required if DEBUG is False
 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
 ALLOWED_HOSTS = []
@@ -38,7 +28,9 @@ ALLOWED_HOSTS = []
 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
 # although not all choices may be available on all operating systems.
 # In a Windows environment this must be set to your system time zone.
-TIME_ZONE = 'America/Chicago'
+
+# Always use local computer's time zone
+TIME_ZONE = ''
 
 # Language code for this installation. All choices can be found here:
 # http://www.i18nguy.com/unicode/language-identifiers.html
@@ -54,6 +46,7 @@ USE_I18N = True
 # calendars according to the current locale.
 USE_L10N = True
 
+
 # If you set this to False, Django will not use timezone-aware datetimes.
 USE_TZ = True
 
@@ -167,3 +160,14 @@ LOGGING = {
         },
     }
 }
+
+# If we're using sqlite, we need to tweak the performance a bit
+from django.db.backends.signals import connection_created
+def activate_synchronous_off(sender, connection, **kwargs):
+    if connection.vendor == 'sqlite':
+        cursor = connection.cursor()
+        cursor.execute('PRAGMA synchronous = 0;')
+connection_created.connect(activate_synchronous_off)
+#
+
+
-- 
1.8.1.2




More information about the bitbake-devel mailing list