#23756: Fall DST change breaks timezone.py make_aware
----------------------------+--------------------
Reporter: mdineen | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
----------------------------+--------------------
make_aware calls localize with DST=None, which breaks with a
AmbiguousTimeError when given naive date strings that fall within the
'fall-back' hour. Example: AmbiguousTimeError: 2014-11-02 01:47:44.554654
Celety project has a very elegant solution at https://github.com/celery
/django-celery/blob/master/djcelery/utils.py#L54-L62
I implemented this in my project to clear errors resulting from this years
DST change. When faces with making an assumption, it calculates both
localized aware dates (with and without DST) and takes the min value.
--
Ticket URL: <https://code.djangoproject.com/ticket/23756>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.c6f79462cf2abe0d06024afcea6a36fb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.