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

S3Boto3: Double localtime() call Exception on modified_time() when settings.USE_TZ=False #234

Closed
piglei opened this issue Dec 4, 2016 · 1 comment

Comments

@piglei
Copy link
Contributor

piglei commented Dec 4, 2016

Current implemention of S3Boto3 backend respect USE_TZ settings on Django>=1.10. But when Django<1.10 users set USE_TZ to False, modified_time() will raise an ValueError:

ValueError: astimezone() cannot be applied to a naive datetime

That's because get_modified_time() already returns a naive datetime object, modified_time() call localtime on this naive object again.

@jschneier
Copy link
Owner

Fixed in #235.

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

No branches or pull requests

2 participants