Skip to content

Commit

Permalink
FIX: make "year" period work in leap year
Browse files Browse the repository at this point in the history
  • Loading branch information
peteh authored and frenck committed Dec 3, 2024
1 parent 6fc4f45 commit f3cf0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/recorder/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ def resolve_period(
start_time = (start_time + timedelta(days=cal_offset * 366)).replace(
month=1, day=1
)
end_time = (start_time + timedelta(days=365)).replace(day=1)
end_time = (start_time + timedelta(days=366)).replace(day=1)

start_time = dt_util.as_utc(start_time)
end_time = dt_util.as_utc(end_time)
Expand Down

0 comments on commit f3cf0f6

Please sign in to comment.