You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Neil Hanlon (JIRA)" <ji...@apache.org> on 2017/06/28 19:29:00 UTC

[jira] [Commented] (AIRFLOW-504) datetime.now() has microseconds Mysql does not store these resulting in issues

    [ https://issues.apache.org/jira/browse/AIRFLOW-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067100#comment-16067100 ] 

Neil Hanlon commented on AIRFLOW-504:
-------------------------------------

[~bolke] It should really be noted somewhere that this commit means you cannot run mysql < 5.6.

Just ran into this while upgrading.

> datetime.now() has microseconds Mysql does not store these resulting in issues
> ------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-504
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-504
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Bolke de Bruin
>            Priority: Critical
>
> >>> datetime.datetime.utcnow()
> datetime.datetime(2016, 9, 11, 12, 22, 22, 483998)
> >>> datetime.datetime.now()
> datetime.datetime(2016, 9, 11, 14, 22, 31, 363392)
> >>>
> Mysql rounds those to "2016-05-13 00:00:00". If sqlalchemy now tries to find the the record by primary key (eg. session.merge) it cannot find them due to lost precision.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)