Closed EdwardIII closed 3 years ago
Sounds like a plan. I forget - did timezone handling arrive in Django 1.4? Just trying to think if there are any back-compat concerns.
From what I can see it was introduced in 1.4: New in Django 1.4.
If you need to support further back than that perhaps you could use something like this?
try:
import django.utils.timezone as my_datetime
except ImportError:
from datetime import datetime as my_datetime
print my_datetime.now() # You'd need to change all calls to now
Well - that prompted me to check the lazysignup docs, and they claim it works on 1.2! I think that's definitely wrong. The Travis CI config only tests 1.4 or later. I'm happy to make lazysignup officially 1.4 or later now, so we don't need to worry about conditional imports for this. I should also update the docs...!
Awesome, thanks for looking into this!
Any hope of this being addressed?
Would it be possible to modify the migration 0002_auto__add_field_lazyuser_created to use django timezone aware datetimes? Currently it produces warnings during tests etc like this one (configured to turn warnings into errors so as to show stacktrace):