Resolving AmbiguousTimeError from Django's make_aware
I have a code as follows: from django.utils.timezone import get_current_timezone, make_aware make_aware(some_datetime, get_current_timezone()) The make_aware call occasionally raises AmbiguousTimeError: 2013-11-03 01:23:17 I know from the Django docs that this is a daylight savings problem, and that this timestamp is in fact ambiguous. Now how do i resolve it (say to the first of the two possible times this could be)? Zags Prophylactics You should avoid naive datetimes in the first place using the following: from django.utils import timezone now = timezone.now() If like me, you have naive