Ticket #977: timesince.diff

File timesince.diff, 557 bytes (added by pgross@…, 19 years ago)
  • utils/timesince.py

     
    1616      (60, lambda n: ngettext('minute', 'minutes', n))
    1717    )
    1818    if now:
    19         t = time.mktime(now)
     19        t = now.timetuple()
    2020    else:
    2121        t = time.localtime()
    2222    if d.tzinfo:
     
    4747    the given time.
    4848    """
    4949    now = datetime.datetime.now()
    50     return timesince(now, time.mktime(d.timetuple()))
     50    return timesince(now, d)
Back to Top