From c6acd5378cf37fc7d505931c2dee32b61a0db368 Mon Sep 17 00:00:00 2001 From: meeb Date: Fri, 2 Feb 2024 05:51:20 +1100 Subject: [PATCH] move TIME_ZONE set by env var from local_settings to settings, resolves #462 --- tubesync/tubesync/local_settings.py.container | 3 --- tubesync/tubesync/settings.py | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container index a7a07ab..a149ca7 100644 --- a/tubesync/tubesync/local_settings.py.container +++ b/tubesync/tubesync/local_settings.py.container @@ -25,9 +25,6 @@ DEBUG = True if os.getenv('TUBESYNC_DEBUG', False) else False FORCE_SCRIPT_NAME = os.getenv('DJANGO_FORCE_SCRIPT_NAME', DJANGO_URL_PREFIX) -TIME_ZONE = os.getenv('TZ', 'UTC') - - database_dict = {} database_connection_env = os.getenv('DATABASE_CONNECTION', '') if database_connection_env: diff --git a/tubesync/tubesync/settings.py b/tubesync/tubesync/settings.py index f1a333b..671547b 100644 --- a/tubesync/tubesync/settings.py +++ b/tubesync/tubesync/settings.py @@ -1,3 +1,4 @@ +import os from pathlib import Path @@ -96,7 +97,7 @@ AUTH_PASSWORD_VALIDATORS = [ LANGUAGE_CODE = 'en-us' -TIME_ZONE = 'UTC' +TIME_ZONE = os.getenv('TZ', 'UTC') USE_I18N = True USE_L10N = True USE_TZ = True