Django

Code

Ticket #7201 (new)

Opened 3 days ago

timeuntil filter misbehaves if my datetime has a timezone

Reported by: terry@weissman.org Assigned to: nobody
Component: Uncategorized Version: SVN
Keywords: Cc:
Triage Stage: Unreviewed Has patch: 0
Needs documentation: Needs tests:
Patch needs improvement:

Description

Looking in the code, I see that django.utils.timesince carefully tries to compute "now" using an appropriate timezone if you call timesince() with now=Null. However, if you call the timeuntil() routine in that module, or if you use django.template.defaultfilters.timeuntil(), then it computes now using no timezone at all. If the datetime you pass into timeuntil has a timezone set, then the result you get is several hours off.

Attachments


Add/Change #7201 (timeuntil filter misbehaves if my datetime has a timezone)




Change Properties
Action