diff --git a/qschedule.py b/qschedule.py index 536379a..4d60f4a 100644 --- a/qschedule.py +++ b/qschedule.py @@ -58,7 +58,10 @@ def timeUntilWeeknight(self, t): return weeknightStart - t def weeknightTimeRemaining(self, t): - weeknightEnd = t + relativedelta(hour=6, minute=0, second=0, microseconds=0, days=+1) + if t.hour >=18: + weeknightEnd = t + relativedelta(hour=6, minute=0, second=0, microseconds=0, days=+1) + else: + weeknightEnd = t + relativedelta(hour=6, minute=0, second=0, microseconds=0, days=0) return weeknightEnd - t def isWeekend(self, t):