airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] ashb commented on a change in pull request #6324: [AIRFLOW-XXX] Clarify daylight savings time behaviour
Date Mon, 14 Oct 2019 12:06:11 GMT
ashb commented on a change in pull request #6324: [AIRFLOW-XXX] Clarify daylight savings time
behaviour
URL: https://github.com/apache/airflow/pull/6324#discussion_r334448365
 
 

 ##########
 File path: docs/timezone.rst
 ##########
 @@ -147,18 +147,20 @@ It is left up to the DAG to handle this.
     local_tz = pendulum.timezone("Europe/Amsterdam")
     local_tz.convert(execution_date)
 
-
 Cron schedules
 ''''''''''''''
 
-In case you set a cron schedule, Airflow assumes you will always want to run at the exact
same time. It will
-then ignore day light savings time. Thus, if you have a schedule that says
-run at the end of interval every day at 08:00 GMT+1 it will always run at the end of interval
08:00 GMT+1,
-regardless if day light savings time is in place.
-
+Time zone aware DAGs that use cron schedules respect daylight savings
+time. For example, a DAG with a start date in the `US/Eastern` time zone
+with a schedule of `0 0 * * *` will run daily at 04:00 UTC during
+daylight savings time and at 05:00 otherwise.
 
 Time deltas
 '''''''''''
-For schedules with time deltas Airflow assumes you always will want to run with the specified
interval. So if you
-specify a ``timedelta(hours=2)`` you will always want to run two hours later. In this case
day light savings time will
-be taken into account.
+
+Time zone aware DAGs that use `timedelta` or `relativedelta` schedules
+respect daylight savings time for the start date but do not adjust for
+daylight savings time when scheduling subsequent runs. For example, a
+DAG with a start date of `pendulum.create(2020, 1, 1, tz="US/Eastern")`
+and a schedule interval of `timedelta(days=1)` will run daily at 05:00
 
 Review comment:
   ```suggestion
   and a schedule interval of ``timedelta(days=1)`` will run daily at 05:00
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message