#16924: 'date' template filter displays certain timezones incorrectly
-------------------------------------+-------------------------------------
               Reporter:  mrgriscom  |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Milestone:             |      Component:  Core (Other)
                Version:  SVN        |       Severity:  Normal
             Resolution:             |       Keywords:  template, date,
           Triage Stage:  Accepted   |  filter, timezone
    Needs documentation:  0          |      Has patch:  0
Patch needs improvement:  0          |    Needs tests:  0
                  UI/UX:  0          |  Easy pickings:  1
-------------------------------------+-------------------------------------
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * component:  Template system => Core (Other)
 * needs_tests:   => 0
 * easy:  0 => 1
 * needs_docs:   => 0
 * has_patch:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 Indeed, the arithmetic at
 
https://code.djangoproject.com/browser/django/trunk/django/utils/dateformat.py#L184
 is incorrect for negative values:
 {{{
 >>> seconds = 600
 >>> u"%+03d%02d" % (seconds // 3600, (seconds // 60) % 60)
 u'+0010'
 >>> seconds = -600
 >>> u"%+03d%02d" % (seconds // 3600, (seconds // 60) % 60)
 u'-0150'
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16924#comment:1>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to