Merge pull request #7777 from jeromecoutant/PR_SUNDAY

STM32F1 RTC : wrong Sunday value
pull/7803/head
Cruz Monrreal 2018-08-15 16:15:48 -05:00 committed by GitHub
commit 134ff0a3a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -250,8 +250,8 @@ void rtc_write(time_t t)
}
// Fill RTC structures
if (timeinfo.tm_wday == 0) {
dateStruct.WeekDay = 7;
if (timeinfo.tm_wday == 0) { /* Sunday specific case */
dateStruct.WeekDay = RTC_WEEKDAY_SUNDAY;
} else {
dateStruct.WeekDay = timeinfo.tm_wday;
}