Merge "Fix ignored timezone value from local_settings" into stable/ocata

This commit is contained in:
Jenkins 2017-02-08 05:20:24 +00:00 committed by Gerrit Code Review
commit cfff0063a8

View File

@ -107,7 +107,11 @@ def get_log_length(request):
def get_timezone(request):
return get_config_value(request, 'django_timezone', 'UTC')
# Session and cookie store timezone as django_timezone.
# In case there is no timezone neither in session nor cookie
# use default value from settings file where it's called TIME_ZONE
return get_config_value(request, 'django_timezone',
getattr(settings, 'TIME_ZONE', 'UTC'))
def get_language(request):