This is an automated email from the ASF dual-hosted git repository.

husseinawala pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 7efc68c8e3 Move default timezone to except block (#34245)
7efc68c8e3 is described below

commit 7efc68c8e351c9aa1f9fa66bc67f325749396b6b
Author: Hussein Awala <[email protected]>
AuthorDate: Sat Sep 9 23:07:49 2023 +0200

    Move default timezone to except block (#34245)
---
 airflow/settings.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/airflow/settings.py b/airflow/settings.py
index aff84d9e46..43dd84eee8 100644
--- a/airflow/settings.py
+++ b/airflow/settings.py
@@ -49,8 +49,6 @@ if TYPE_CHECKING:
 
 log = logging.getLogger(__name__)
 
-
-TIMEZONE = pendulum.tz.timezone("UTC")
 try:
     tz = conf.get_mandatory_value("core", "default_timezone")
     if tz == "system":
@@ -58,7 +56,8 @@ try:
     else:
         TIMEZONE = pendulum.tz.timezone(tz)
 except Exception:
-    pass
+    TIMEZONE = pendulum.tz.timezone("UTC")
+
 log.info("Configured default timezone %s", TIMEZONE)
 
 

Reply via email to