Airflow timezone for configuration file

2020-03-31 05:19发布

问题:

I am trying to change the configuration for Airflow from UTC se to Europe/Amsterdam in airflow.cgf file in the core section.

[core]

default_timezone=`Europe/Amsterdam`

but this doesn't work

let me know if any body have any idea about this

thanks

回答1:

Taken from SO Answer here and slightly summarized:

  • Airflow running in the local timezone prior to version 1.9.0 was unintended and just a side effect of Airflow code using datetime.now() and datetime.today() instead of datetime.utcnow(). Official support for Airflow to be timezone aware is merged into the master branch. This work was completed as part of AIRFLOW-288 and is not available in the latest stable version (1.9.0). You can probably expect it in the next major release [1.10].
  • So default_timezone=Europe/Amsterdam in your airflow.cfg should work in Airflow 1.10, but 1.10 has not been released yet.