#29514: get_default_timezone() for UTC is no longer equivalent to timezone.utc
-------------------------------------+-------------------------------------
     Reporter:  Carlton Gibson       |                    Owner:  Carlton
                                     |  Gibson
         Type:  Bug                  |                   Status:  assigned
    Component:  Utilities            |                  Version:  2.1
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 The issue is also present anywhere a timezone is constructed with
 `pytz.timezone()`, e.g.
 
[https://github.com/django/django/blob/7cdeb23ae7ef2d125276840ff298dbb9683959f2/django/utils/timezone.py#L121
 timezone.activate()]:
 {{{
 from django.conf import settings
 settings.configure(USE_TZ=True)
 from django.utils.timezone import get_current_timezone, utc
 from django.utils import timezone
 timezone.activate('UTC')
 get_current_timezone() is utc  # False in Django 2.1, True in older
 versions
 }}}
 If we accept the proposed patch, I'd think we would also want to fix the
 issue there, and perhaps add a backwards incompatible release note for
 anyone using `pytz.timezone()` in their code. It might be better to
 reconsider the original patch.

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

Reply via email to