#23756: Fall DST change breaks timezone.py make_aware
---------------------------+------------------------------------
     Reporter:  mdineen    |                    Owner:  nobody
         Type:  Bug        |                   Status:  closed
    Component:  Utilities  |                  Version:  1.7
     Severity:  Normal     |               Resolution:  invalid
     Keywords:             |             Triage Stage:  Accepted
    Has patch:  0          |      Needs documentation:  0
  Needs tests:  0          |  Patch needs improvement:  0
Easy pickings:  0          |                    UI/UX:  0
---------------------------+------------------------------------

Comment (by carljm):

 @jbg The main reason I can see not to add the `is_dst` argument is that
 (if you're using pytz, which you certainly should be if you care at all
 about correct timezone handling) `timezone.make_aware(value, tz)` is
 simply a different spelling of `tz.localize(value)`, and the latter is
 actually shorter, and already has the `is_dst` argument. So if you are
 using `pytz`, there's really no reason not to just use `tz.localize()`
 instead of `timezone.make_aware()`. The only real purpose of
 `timezone.make_aware()` is to offer semi-correct handling for the no-pytz
 case, and in that case I don't think there's anything sane we could do
 with the `is_dst` argument anyway.

--
Ticket URL: <https://code.djangoproject.com/ticket/23756#comment:7>
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/065.b4ce3e550a30f9c96068543857d4f7cc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to