Browse Source

properly calculate relative offsets via parseDT

master
Brian S. Stephan 9 months ago
parent
commit
bc7108cfb7
  1. 2
      countdown/ircplugin.py

2
countdown/ircplugin.py

@ -83,7 +83,7 @@ class Countdown(Plugin):
reminder.sent_reminder = True
elif reminder.recurring_period != '':
calendar = pdt.Calendar()
when_t = calendar.parseDT(reminder.recurring_period, reminder.at_time,
when_t = calendar.parseDT(f'in one {reminder.recurring_period}', reminder.at_time,
tzinfo=reminder.at_time.tzinfo)[0]
if reminder.recurring_until is None or when_t <= reminder.recurring_until:
reminder.at_time = when_t

Loading…
Cancel
Save