We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fc80b08 + fd7bbd5 commit 7158d82Copy full SHA for 7158d82
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
59
hal_time.ui32Year = year;
60
hal_time.ui32Century = 0;
61
62
- 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
63
64
am_hal_rtc_time_set(&hal_time); //Initialize the RTC with this date/time
65
}
0 commit comments