From e91c194b984ad0a86848e40c259bae0bf8b979b3 Mon Sep 17 00:00:00 2001 From: Lewis Jackson <> Date: Fri, 2 Jun 2023 00:15:59 +0300 Subject: [PATCH] Fix for Wday when offsetting time --- src/WatchFeatures/RTC.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/WatchFeatures/RTC.cpp b/src/WatchFeatures/RTC.cpp index fb40f85..cd0aef3 100644 --- a/src/WatchFeatures/RTC.cpp +++ b/src/WatchFeatures/RTC.cpp @@ -102,6 +102,8 @@ void WatchFeatures::RTC::OffsetTime(tmElements_t & tm, int offsetInSeconds) tm.Hour = hour; tm.Minute = minute; tm.Second = second; + time_t t = makeTime(tm); // make and break to calculate tm.Wday + breakTime(t, tm); } // TODO: implement more advanced wakeup logic, i.e. > 255 seconds that are not a multiple of 60