配置文件的气流时区 [英] Airflow timezone for configuration file

查看:74
本文介绍了配置文件的气流时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在 airflow.cgf 文件中将Airflow的配置从UTC se更改为欧洲/阿姆斯特丹

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`

但这不起作用

让我知道是否有人对此有任何想法

let me know if any body have any idea about this

谢谢

推荐答案

来自在此处回答并进行了简要总结:

Taken from SO Answer here and slightly summarized:


  • 在1.9.0版之前的本地时区运行的气流是意料之外的以及使用datetime.now()和datetime.today()而不是datetime.utcnow()的Airflow代码的副作用。对Airflow具有时区意识的官方支持已合并到master分支中。这项工作是作为AIRFLOW-288的一部分完成的,并且在最新的稳定版本(1.9.0)中不可用。您可能会在下一个主要版本[1.10]中看到它。

  • 因此,airflow.cfg中的 default_timezone = Europe / Amsterdam 在Airflow 1.10中工作,但1.10尚未发布。

  • 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.

这篇关于配置文件的气流时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆