Ticket #9080: timesince.patch
File timesince.patch, 603 bytes (added by , 16 years ago) |
---|
-
django/utils/timesince.py
34 34 now = datetime.datetime.now(LocalTimezone(d)) 35 35 else: 36 36 now = datetime.datetime.now() 37 # If now is date type 38 elif now.__class__ is not datetime.datetime: 39 now = datetime.datetime(now.year, now.month, now.day) 37 40 38 41 # ignore microsecond part of 'd' since we removed it from 'now' 39 42 delta = now - (d - datetime.timedelta(0, 0, d.microsecond))