Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#977 closed defect (fixed)

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

Reported by: pgross@… Owned by: adrian
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: UI/UX:

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@… 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by pgross@…

comment:1 Changed 10 years ago by pgross@…

  • Summary changed from timesince() method is broken when now argument is passed to [patch] timesince() method is broken when now argument is passed

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

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