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 TZ awareness in S3Boto3Storage #181

Merged
merged 1 commit into from
Aug 4, 2016

Conversation

JshWright
Copy link
Contributor

@JshWright JshWright commented Aug 3, 2016

Django expects a naive datetime from the modified_time() method.
Django 1.10 adds a get_modified_time() method which respects USE_TZ.

This commit fixes modified_time(), adds get_modified_time(), and adds
relevant tests.

@codecov-io
Copy link

codecov-io commented Aug 3, 2016

Current coverage is 60.35% (diff: 85.71%)

Merging #181 into master will increase coverage by 0.36%

@@             master       #181   diff @@
==========================================
  Files            18         18          
  Lines          1652       1657     +5   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            991       1000     +9   
+ Misses          661        657     -4   
  Partials          0          0          

Powered by Codecov. Last update d4c7c56...f3de7da

Django expects a naive datetime from modified_time()[1]. Django 1.10
adds get_modified_time()[2], which respects USE_TZ.

This commit fixes modified_time(), adds get_modified_time(), and adds
relevant tests.

[1]: https://docs.djangoproject.com/en/1.10/ref/files/storage/#django.core.files.storage.Storage.modified_time
[2]: https://docs.djangoproject.com/en/1.10/ref/files/storage/#django.core.files.storage.Storage.get_modified_time
@jschneier
Copy link
Owner

Thank you. Guess I need to update...all of the backends for the new Django 1.10 API :p

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.

3 participants