Django

Code

Ticket #977 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: pgross@thoughtworks.com Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

timesince.diff (0.5 kB) - added by pgross@thoughtworks.com on 12/01/05 12:42:19.

Change History

12/01/05 12:42:19 changed by pgross@thoughtworks.com

  • attachment timesince.diff added.

12/01/05 12:44:05 changed by pgross@thoughtworks.com

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

12/08/05 20:52:30 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #977 ([patch] timesince() method is broken when now argument is passed)




Change Properties
Action