Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#977 closed defect (fixed)

[patch] timesince() method is broken when now argument is passed

Reported by: pgross@… 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

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.

Attachments (1)

timesince.diff (557 bytes ) - added by pgross@… 19 years ago.

Download all attachments as: .zip

Change History (3)

by pgross@…, 19 years ago

Attachment: timesince.diff added

comment:1 by pgross@…, 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 Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [1579]) Fixed #977 -- Fixed timesince() utility. Thanks, pgross@…

Note: See TracTickets for help on using tickets.
Back to Top