fix local time timestamp calculation (#7807)

Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
Samuel SiebandSamuel Sieb authored and GitHub committed 2024-11-26 13:15:01 +13:00
1 parent f4766ab74f
commit a70cee1dc1
3 files changed
+21 -21

No files matched your search

@@ -60,9 +60,7 @@ ESPTime DateTimeEntity::state_as_esptime() const {
obj.hour = this->hour_;
obj.minute = this->minute_;
obj.second = this->second_;
obj.day_of_week = 1; // Required to be valid for recalc_timestamp_local but not used.
obj.day_of_year = 1; // Required to be valid for recalc_timestamp_local but not used.
obj.recalc_timestamp_local(false);
obj.recalc_timestamp_local();
return obj;
}