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

Comment (by Daniel Hahler):

 Just for information:

 > While investing, I noticed that pytz.utc is ​described as "Optimized UTC
 implementation." yet the ​offending commit in Django says "Used
 datetime.timezone.utc instead of pytz.utc for better performance."

 The performance improvement basically comes from datetime being
 implemented in C completely, while using ``pytz.utc`` calls into Python
 code (at least) 2 times (for `utcoffset`/`dst`).

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

Reply via email to