diff --git a/.env.template b/.env.template index c1ba71f7..3556d34c 100644 --- a/.env.template +++ b/.env.template @@ -28,7 +28,7 @@ SECRET_KEY_FILE= # --------------------------------------------------------------- # your default timezone See https://timezonedb.com/time-zones for a list of timezones -TIMEZONE=Europe/Berlin +TZ=Europe/Berlin # add only a database password if you want to run with the default postgres, otherwise change settings accordingly DB_ENGINE=django.db.backends.postgresql diff --git a/recipes/settings.py b/recipes/settings.py index df2c2b1d..42164766 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -450,7 +450,11 @@ for p in PLUGINS: LANGUAGE_CODE = 'en' -TIME_ZONE = os.getenv('TIMEZONE') if os.getenv('TIMEZONE') else 'Europe/Berlin' +if os.getenv('TIMEZONE') is not None: + print('DEPRECATION WARNING: Environment var "TIMEZONE" is deprecated. Please use "TZ" instead.') + TIME_ZONE = bool(int(os.getenv('REVERSE_PROXY_AUTH', False))) +else: + TIME_ZONE = os.getenv('TZ') if os.getenv('TZ') else 'Europe/Berlin' USE_I18N = True