ashb closed pull request #4136: Fix for scheduler infinite loop when evaluating 
non-UTC DAGs after DST
URL: https://github.com/apache/incubator-airflow/pull/4136
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/models.py b/airflow/models.py
index 381e9d3103..0078b76a7c 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -3206,6 +3206,10 @@ def __init__(
         else:
             self.timezone = settings.TIMEZONE
 
+        # drop utc offsets of start_date so we can operate on both sides of DST
+        if self.timezone:
+            self.timezone = pendulum.timezone(self.timezone.name)
+
         self.start_date = timezone.convert_to_utc(start_date)
         self.end_date = timezone.convert_to_utc(end_date)
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to