[
https://issues.apache.org/jira/browse/AIRFLOW-3915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967839#comment-16967839
]
Ash Berlin-Taylor commented on AIRFLOW-3915:
--------------------------------------------
Yes still an issue.
Repro steps:
{code:python}
from airflow import DAG
from datetime import datetime, timedelta, timezone
dag = DAG('my_dag', start_date=datetime(2019, 2, 6, hour=0,
tzinfo=timezone(timedelta(0), name='UTC'))
{code}
> Scheduler fails for dags with datetime start_date
> -------------------------------------------------
>
> Key: AIRFLOW-3915
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3915
> Project: Apache Airflow
> Issue Type: Bug
> Components: models
> Affects Versions: 1.10.2
> Reporter: David Stuck
> Priority: Major
>
> When start_date is passed in to a dag as a datetime object, it does not get
> converted to pendulum and thus the scheduler fails at
> [https://github.com/apache/airflow/blob/4083a8f5217e9ca7a5c83a3eaaaf403dd367a90c/airflow/models.py#L3487]
> when trying to access `self.timezone.name`.
> My guess is that the fix is as simple as setting `self.timezone =
> pendulum.instance(self.timezone)` in `__init__`. If that sounds right I can
> create a PR.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)