#27921: Documentation of make_aware() with is_dst is misleading
-------------------------------------+-------------------------------------
     Reporter:  Kevin Christopher    |                    Owner:  paqman85
  Henry                              |
         Type:  Bug                  |                   Status:  assigned
    Component:  Documentation        |                  Version:  master
     Severity:  Normal               |               Resolution:
     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 paqman85):

 This ticket has been opened for quite a while so I thought I'd make the
 changes suggested by Kevin Christopher Henry, which does clarify the issue
 without overcomplicating it (in my opinion).

 Changes noted below:

     The '''pytz.NonExistentTimeError''' exception is raised if you try to
 make '''value''' aware during a DST transition such that the time never
 occurred. For example, if the 2:00 hour is skipped during a DST
 transition, trying to make 2:30 aware in that time zone will lead to an
 exception. To avoid that you can use '''is_dst''' to specify how
 make_aware should interpret such a non-existing time. If '''is_dst=True'''
 then the above time would be interpreted as 2:30 DST time (equivalent to
 1:30 local time). Conversely, if '''is_dst=False''' the time would be
 interpreted as 2:30 standard time (equivalent to 3:30 local time).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27921#comment:10>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.e66de3a0a665e90e228736eb6a3a04e4%40djangoproject.com.

Reply via email to