Fixed #19708 -- django.utils.timezone.override helper may raise AttributeError

https://code.djangoproject.com/ticket/19708