uranusjr commented on code in PR #28400:
URL: https://github.com/apache/airflow/pull/28400#discussion_r1051813105


##########
airflow/models/dag.py:
##########
@@ -462,8 +462,10 @@ def __init__(
         # set timezone from start_date
         tz = None
         if start_date and start_date.tzinfo:
-            tzinfo = None if start_date.tzinfo else settings.TIMEZONE
-            tz = pendulum.instance(start_date, tz=tzinfo).timezone
+            if start_date.tzinfo is None:
+                tz = pendulum.instance(start_date, 
tz=settings.TIMEZONE).timezone
+            else:
+                tz = pendulum.instance(start_date).timezone

Review Comment:
   This seems wrong? The outer `if if start_date and start_date.tzinfo` should 
already ensure `start_date.tzinfo` is not None.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to