Skip to content

Commit fd7bbd5

Browse files
committed
Fix for issue #62. Thanks @JLC333-Github !
1 parent b253f71 commit fd7bbd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/RTC/src/RTC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void APM3_RTC::setTime(uint8_t hour, uint8_t min, uint8_t sec, uint8_t hund, uin
5959
hal_time.ui32Year = year;
6060
hal_time.ui32Century = 0;
6161

62-
hal_time.ui32Weekday = am_util_time_computeDayofWeek(2000 + year, month + 1, dayOfMonth);
62+
hal_time.ui32Weekday = am_util_time_computeDayofWeek(2000 + year, month, dayOfMonth); //computeDayofWeek is expecting 1 to 12 months
6363

6464
am_hal_rtc_time_set(&hal_time); //Initialize the RTC with this date/time
6565
}

0 commit comments

Comments
 (0)