Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[AIRFLOW-288] Make airflow timezone aware #2781
Dear Airflow maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
To be updated.
Dependent on: sdispater/pendulum#161
I ran this locally with mysql backend:
Looks like mysqldb no longer knows how to handle the datetime when it's in a pendulum object.
@jgao54 Thanks! Can you verify if the database migration was done correctly? The naive datetimes (ie. before migration) should be the same after migration only with the UTC offset added.
I have pushed a fix for the conversion error (I am Postgres focused at the moment), see also:
@@ Coverage Diff @@ ## master #2781 +/- ## ========================================== + Coverage 73.62% 73.84% +0.21% ========================================== Files 158 159 +1 Lines 11962 12076 +114 ========================================== + Hits 8807 8917 +110 - Misses 3155 3159 +4
referenced this pull request
Nov 21, 2017
When I set
Tested locally with mysql db and verified the following:
Asides from comments above, didn't see any other issues.
Looking forward to this feature
Maybe also take this date into account:
Otherwise the logs will be utc, which might be confusing.
Nov 27, 2017
1 check passed
There is no DateTime2literal function in module MySQLdb.converters, and there is no DateTime2literal function in module pymysql.
I use mysql as Metastore, when I run airflow initdb, it go wrong.