#977 closed defect (fixed)
[patch] timesince() method is broken when now argument is passed
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | |
Severity: | major | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | How to create a pull request | ||
Description ¶
The timesince() method in django.utils.timesince is broken when the now argument is passed. The code
if now: t = time.mktime(now)
returns a float, but the code below clearly expects a tuple. Also, the timeuntil() method passes now as a float. Perhaps it should be a tuple or a datetime object.
Change History (3)
by , 19 years ago
Attachment: | timesince.diff added |
---|
comment:1 by , 19 years ago
Summary: | timesince() method is broken when now argument is passed → [patch] timesince() method is broken when now argument is passed |
---|
comment:2 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [1579]) Fixed #977 -- Fixed timesince() utility. Thanks, pgross@…