Ash Berlin-Taylor created AIRFLOW-5808:
------------------------------------------

             Summary: DAG timezones from datetime.timezone not converted to 
Pendulm
                 Key: AIRFLOW-5808
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5808
             Project: Apache Airflow
          Issue Type: Bug
          Components: DAG
    Affects Versions: 1.10.5
            Reporter: Ash Berlin-Taylor
             Fix For: 1.10.7


The airflow docs mention that you should use Pendulum timezones, but we don't 
enforce this, and the stdlib timezone is mostly, but not entirely API 
compatible with this.

For instance if you create your DAG like this:

{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}

It will _mostly_ work, except this will break the Tooltip generation in the 
graph page as it expects a pendulm.timezone.

To make everything predictable in Airflow the DAG constructor should convert 
non-pendulum timezones when it encounters them.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to