127 tendtoday=twhen.replace(hour=23,minute=59,second=59) |
127 tendtoday=twhen.replace(hour=23,minute=59,second=59) |
128 tendtomorrow=tendtoday+datetime.timedelta(days=1) |
128 tendtomorrow=tendtoday+datetime.timedelta(days=1) |
129 diff=datetime.timedelta(seconds=when-now) |
129 diff=datetime.timedelta(seconds=when-now) |
130 |
130 |
131 if twhen<tnow: |
131 if twhen<tnow: |
132 whenstr='overdue' |
132 whenstr='overdue' + (' on %s' % twhen.isoformat()) |
133 elif twhen>tendtomorrow: |
133 elif twhen>tendtomorrow: |
134 # Display date if scheduled event is after tomorrow |
134 # Display date if scheduled event is after tomorrow |
135 whenday=datetime.date.fromtimestamp(when) |
135 whenday=datetime.date.fromtimestamp(when) |
136 whenstr='on %s' % twhen.date().isoformat() |
136 whenstr='on %s' % twhen.date().isoformat() |
137 this_refresh_time=tendtoday+datetime.timedelta(seconds=1) |
137 this_refresh_time=tendtoday+datetime.timedelta(seconds=1) |