mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7777 from jeromecoutant/PR_SUNDAY
STM32F1 RTC : wrong Sunday valuepull/7803/head
commit
134ff0a3a9
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue