[ 
https://issues.apache.org/jira/browse/AIRFLOW-4981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16894773#comment-16894773
 ] 

ASF subversion and git services commented on AIRFLOW-4981:
----------------------------------------------------------

Commit 5e893b2b50cfc22eb83ba9f3610430c9bc71ec47 in airflow's branch 
refs/heads/v1-10-test from Arlo Purcell
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=5e893b2 ]

[AIRFLOW-4981][AIRFLOW-4788] Always use pendulum DateTimes in task in… (#5654)

* [AIRFLOW-4981][AIRFLOW-4788] Always use pendulum DateTimes in task instance 
context

In certain situations, like when using fixed cron schedules such as `0
12 * * *`, the `execution_date`, `prev_execution_date`, and
`next_execution_date` variables in macros were native python `datetime`
objects instead of, as stated in the docs, pendulum `DateTime` objects.

(cherry picked from commit ab63c26e9dea054225c9caca69ce6dfebcb096d6)


> execution_date in macro is not a pendulum DateTime for fixed cron schedules
> ---------------------------------------------------------------------------
>
>                 Key: AIRFLOW-4981
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4981
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DAG
>    Affects Versions: 1.10.3
>            Reporter: Arlo Purcell
>            Assignee: Arlo Purcell
>            Priority: Minor
>
> When using a fixed cron schedule_interval such as "0 12 * * *", the 
> execution_date (as well as next_execution_date) available in macros is a 
> python datetime object, not a pendulum DateTime as indicated in the macro 
> docs. For my purposes, this means that methods such as in_timezone are not 
> available.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to