From fd7bbd56ab722811f1a2860055174d3bc4c0e495 Mon Sep 17 00:00:00 2001 From: Nathan Seidle Date: Wed, 20 Nov 2019 16:10:00 -0700 Subject: [PATCH] Fix for issue #62. Thanks @JLC333-Github ! --- libraries/RTC/src/RTC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/RTC/src/RTC.cpp b/libraries/RTC/src/RTC.cpp index 02946e9b..410c1aac 100644 --- a/libraries/RTC/src/RTC.cpp +++ b/libraries/RTC/src/RTC.cpp @@ -59,7 +59,7 @@ void APM3_RTC::setTime(uint8_t hour, uint8_t min, uint8_t sec, uint8_t hund, uin hal_time.ui32Year = year; hal_time.ui32Century = 0; - hal_time.ui32Weekday = am_util_time_computeDayofWeek(2000 + year, month + 1, dayOfMonth); + hal_time.ui32Weekday = am_util_time_computeDayofWeek(2000 + year, month, dayOfMonth); //computeDayofWeek is expecting 1 to 12 months am_hal_rtc_time_set(&hal_time); //Initialize the RTC with this date/time }