Verified Commit 55958c1b authored by Fabio Manganiello's avatar Fabio Manganiello
Browse files

[#217] Casting `get_next` to `datetime` to prevent DST issues

parent e9454b0c
Pipeline #222 passed with stages
in 8 minutes and 47 seconds
......@@ -90,8 +90,8 @@ class Cronjob(threading.Thread):
now = get_now()
self._event_type = CronjobEvent.NONE
cron = croniter.croniter(self.cron_expression, now)
next_run = cron.get_next()
self._event.wait(max(0, next_run - now.timestamp()))
next_run = cron.get_next(datetime.datetime)
self._event.wait(max(0, (next_run - now).total_seconds()))
def stop(self):
self._event_type = CronjobEvent.STOP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment