airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Jurney (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-289) Use datetime.utcnow() to keep airflow system independent
Date Thu, 18 May 2017 16:10:04 GMT

    [ 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)

Mime
View raw message