mirror of
https://github.com/home-assistant/core.git
synced 2026-08-21 13:50:31 +01:00
Fix possible timezone issue in Trafikverket Ferry (#170592)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
parent
7f08212efd
commit
7b4d2bdd6d
@@ -34,7 +34,7 @@ def next_weekday(fromdate: date, weekday: int) -> date:
|
||||
|
||||
def next_departuredate(departure: list[str]) -> date:
|
||||
"""Calculate the next departuredate from an array input of short days."""
|
||||
today_date = date.today() # noqa: DTZ011
|
||||
today_date = dt_util.now().date()
|
||||
today_weekday = date.weekday(today_date)
|
||||
if WEEKDAYS[today_weekday] in departure:
|
||||
return today_date
|
||||
|
||||
Reference in New Issue
Block a user