From 4956a2a63ada6ed97c2d6c7404e275abf499e36f Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 28 Jan 2020 15:57:35 -0800 Subject: [PATCH] web_framework: Set the timezone to UTC This is needed to ensure that all the time/date values stored in the database are UTC. A timezone change in the settings should not make the database values inconsistent. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/web_framework.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plinth/web_framework.py b/plinth/web_framework.py index 45118ce5b..98dd177e6 100644 --- a/plinth/web_framework.py +++ b/plinth/web_framework.py @@ -160,7 +160,9 @@ def init(): 'captcha-refresh', ), TEMPLATES=templates, + TIME_ZONE='UTC', USE_L10N=True, + USE_TZ=True, USE_X_FORWARDED_HOST=cfg.use_x_forwarded_host) django.setup(set_prefix=True)