mirror of
https://github.com/home-assistant/core.git
synced 2026-10-08 07:59:37 +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:
1 parent
7f08212efd
commit
7b4d2bdd6d
1 file changed
+1
-1
@@ -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