You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Russell Jurney (JIRA)" <ji...@apache.org> on 2017/05/18 16:10:04 UTC
[jira] [Commented] (AIRFLOW-289) Use datetime.utcnow() to keep
airflow system independent
[ https://issues.apache.org/jira/browse/AIRFLOW-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16015999#comment-16015999 ]
Russell Jurney commented on AIRFLOW-289:
----------------------------------------
Note that making Airflow use timezones in dates is hard. You have to fix all the datetime.now()s, the datetime.today()s, the static datetime()s and the Column(Datetime)s. And after doing all that, some things still don't want to work.
The other way is this: find airflow -type f -print0 | xargs -0 sed -i 's/datetime.now()/datetime.now(tz=None)/g'
This should work, and takes a couple of minutes. Will see how it does in tests.
> Use datetime.utcnow() to keep airflow system independent
> --------------------------------------------------------
>
> Key: AIRFLOW-289
> URL: https://issues.apache.org/jira/browse/AIRFLOW-289
> Project: Apache Airflow
> Issue Type: Improvement
> Affects Versions: Airflow 1.7.1.3
> Reporter: Vineet Goel
> Assignee: Vineet Goel
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)