# HG changeset patch # User Tuomo Valkonen # Date 1517950553 0 # Node ID 173d9d7048b6914077da608a3729da9c658211d6 # Parent c3bc27cf5ecea804fb02ab9bbb837b7ddd829450 UI time display fixes diff -r c3bc27cf5ece -r 173d9d7048b6 borgend/ui.py --- a/borgend/ui.py Tue Feb 06 20:16:59 2018 +0000 +++ b/borgend/ui.py Tue Feb 06 20:55:53 2018 +0000 @@ -124,9 +124,8 @@ else: tnow=datetime.datetime.fromtimestamp(now) twhen=datetime.datetime.fromtimestamp(when) - tendtoday=twhen.replace(hour=23,minute=59,second=59) + tendtoday=tnow.replace(hour=23,minute=59,second=59) tendtomorrow=tendtoday+datetime.timedelta(days=1) - diff=datetime.timedelta(seconds=when-now) if twhentendtoday and diff.seconds>=12*60*60: # 12 hours + elif twhen>tendtoday and when-now>=12*60*60: # 12 hours # Display 'tomorrow' if the scheduled event is tomorrow and # not earlier than after 12 hours whenstr='tomorrow'