1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 00:32:20 +01:00

fix local time timestamp calculation (#7807)

Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
Samuel Sieb
2024-11-25 14:15:01 -10:00
committed by GitHub
parent f4766ab74f
commit a70cee1dc1
3 changed files with 21 additions and 21 deletions

View File

@@ -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;
}