From 1a2f0b974d789d73b10850060038630b5f01be4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Tue, 3 Jan 2023 20:41:26 +0100 Subject: [PATCH] Set timezone from TZ env variable --- src/web/web/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/web/settings.py b/src/web/web/settings.py index 120fe49..b507056 100644 --- a/src/web/web/settings.py +++ b/src/web/web/settings.py @@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/4.1/ref/settings/ from pathlib import Path import logging +import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -107,7 +108,7 @@ AUTH_PASSWORD_VALIDATORS = [ LANGUAGE_CODE = "en-us" -TIME_ZONE = "UTC" +TIME_ZONE = os.environ["TZ"] USE_I18N = True