smn/django-historicalrecords — pull request #2 by renelux (2012-05-05 04:42:04+00:00)
Title: Make django-historicalrecords compatible with 1.4

When django-historicalrecords is used with Django 1.4 the following Warning will be raised "RuntimeWarning: DateTimeField received a naive datetime (2012-01-01 00:00:00) while time zone support is active."

This is because of the new timezone support in Django, to fix this problem instead of datetime django.utils.timezone should be used to get the current time.

This is fixed by first trying to import django.utils.timezone, if this doesn't work use datetime for backwards compatibility.