Patchwork [bitbake-devel,5/8] toaster: fix timezone settings

login
register
mail settings
Submitter Paul Eggleton
Date Nov. 1, 2013, 3:58 p.m.
Message ID <b5df847f1de4c38a9cb3273b310e912bc8d3a267.1383321482.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/60987/
State Accepted
Commit a4102b549f04a9b52cdcd318bf511a18ab48067d
Headers show

Comments

Paul Eggleton - Nov. 1, 2013, 3:58 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

This patch fixes an issue where, if not defined,
the timezone defaults to 'America/Chicago'.

The solution is to set the timezone to current computer's
timezone.

[YOCTO #5186]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 lib/toaster/toastermain/settings.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/lib/toaster/toastermain/settings.py b/lib/toaster/toastermain/settings.py
index dd1e25c..9435087 100644
--- a/lib/toaster/toastermain/settings.py
+++ b/lib/toaster/toastermain/settings.py
@@ -48,7 +48,8 @@  ALLOWED_HOSTS = []
 # In a Windows environment this must be set to your system time zone.
 
 # Always use local computer's time zone
-#TIME_ZONE = ''
+import time
+TIME_ZONE = time.tzname[0]
 
 # Language code for this installation. All choices can be found here:
 # http://www.i18nguy.com/unicode/language-identifiers.html
@@ -65,7 +66,7 @@  USE_I18N = True
 USE_L10N = True
 
 # If you set this to False, Django will not use timezone-aware datetimes.
-USE_TZ = False
+USE_TZ = True
 
 # Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/var/www/example.com/media/"