diff --git a/src/core/clock.cpp b/src/core/clock.cpp index b232d0b1..0af9762e 100644 --- a/src/core/clock.cpp +++ b/src/core/clock.cpp @@ -55,7 +55,11 @@ void SystemClock::update() { else if (minutePrecision) nextTime = nextTime.addSecs(60); else if (hourPrecision) nextTime = nextTime.addSecs(3600); - this->timer.start(time.msecsTo(nextTime)); + auto delay = time.msecsTo(nextTime); + // day rollover + if (delay < 0) delay += 86400000; + + this->timer.start(delay); } else { this->timer.stop(); }