Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #7777 from jeromecoutant/PR_SUNDAY
Browse files Browse the repository at this point in the history
STM32F1 RTC : wrong Sunday value
  • Loading branch information
Cruz Monrreal committed Aug 15, 2018
2 parents c4e814d + e455d74 commit 134ff0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/TARGET_STM/rtc_api.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 134ff0a

Please sign in to comment.