Skip to content

Commit

Permalink
Fix recalc_timestamp_utc (esphome#7894)
Browse files Browse the repository at this point in the history
  • Loading branch information
RouNNdeL authored Nov 29, 2024
1 parent 217a80a commit 30477c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esphome/core/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void ESPTime::recalc_timestamp_utc(bool use_day_of_year) {
}

for (int i = 1970; i < this->year; i++)
res += (year % 4 == 0) ? 366 : 365;
res += (i % 4 == 0) ? 366 : 365;

if (use_day_of_year) {
res += this->day_of_year - 1;
Expand Down

0 comments on commit 30477c7

Please sign in to comment.