[time] Fix RTC is_valid() rejecting valid times after day_of_year cleanup (#15763)

This commit is contained in:
J. Nick Koston authored and Jesse Hills committed 2026-04-20 10:18:05 +12:00
1 parent 914ed10bcc
commit aa80bdbbc6
7 files changed
+83 -7

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ void PCF8563Component::read_time() {
.year = uint16_t(pcf8563_.reg.year + 10u * pcf8563_.reg.year_10 + 2000),
};
rtc_time.recalc_timestamp_utc(false);
if (!rtc_time.is_valid()) {
if (!rtc_time.is_valid(/*check_day_of_week=*/true, /*check_day_of_year=*/false)) {
ESP_LOGE(TAG, "Invalid RTC time, not syncing to system clock.");
return;
}