Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue when using USE_TZ=False with MySQL #353

Merged
merged 1 commit into from
Aug 10, 2019
Merged

Fix issue when using USE_TZ=False with MySQL #353

merged 1 commit into from
Aug 10, 2019

Conversation

maerteijn
Copy link
Contributor

@maerteijn maerteijn commented Apr 17, 2019

arrow always returns a tz aware datetime, and we don't want this when we explicitly configured Django with USE_TZ=False. This causes issues with MySQL (ERROR MySQL backend does not support timezone-aware datetimes when USE_TZ is False.)

This pull request makes the datetime object from arrow naive again when USE_TZ=False.

This fixes #350 and #352

arrow always returns a tz aware datetime, and we don't want this when we explicitly configured django with USE_TZ=False. This causes issues with MySQL.
@codecov-io
Copy link

Codecov Report

Merging #353 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #353      +/-   ##
=========================================
+ Coverage    90.4%   90.4%   +<.01%     
=========================================
  Files          43      43              
  Lines        2845    2846       +1     
=========================================
+ Hits         2572    2573       +1     
  Misses        273     273
Impacted Files Coverage Δ
django_q/cluster.py 91.7% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c84fd11...c0cda97. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR MySQL backend does not support timezone-aware datetimes when USE_TZ is False.
3 participants