danly opened a new issue #8939: URL: https://github.com/apache/airflow/issues/8939
**Apache Airflow version**: 1.10.2 **What happened**: [According to the docs](https://airflow.apache.org/docs/stable/macros-ref.html) `next_execution_date` is a pendulum instance: > the next execution date (pendulum.Pendulum) However, when trying to call `start_of` method of `next_execution_date` it is a `datetime.datetime` instance. Code: ```python def execute(**kwargs): next_execution_date = kwargs.get('next_execution_date') stop = next_execution_date.start_of('day') #... ``` Error Log: ``` Subtask my_task stop = next_execution_date.start_of('day') Subtask my_task AttributeError: 'datetime.datetime' object has no attribute 'start_of' ``` **How to reproduce it**: Try calling pendulum methods from `next_execution_date` **Stop-gap**: As a temporary fix, I am creating a pendulum instance from the `datetime.datetime` object. ``` def execute(**kwargs): next_execution_date = kwargs.get('next_execution_date') stop = pendulum.instance(next_execution_date).start_of('day') #... ``` ---------------------------------------------------------------- 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: [email protected]
