Ticket #977: timesince.diff
File timesince.diff, 557 bytes (added by , 19 years ago) |
---|
-
utils/timesince.py
16 16 (60, lambda n: ngettext('minute', 'minutes', n)) 17 17 ) 18 18 if now: 19 t = time.mktime(now)19 t = now.timetuple() 20 20 else: 21 21 t = time.localtime() 22 22 if d.tzinfo: … … 47 47 the given time. 48 48 """ 49 49 now = datetime.datetime.now() 50 return timesince(now, time.mktime(d.timetuple()))50 return timesince(now, d)