Fix GTFS sensor wrong timezone ()

pull/26585/head
Tsvi Mostovicz 2019-09-11 19:00:18 +03:00 committed by Martin Hjelmare
parent f53fcacf49
commit 7dfdec531c
1 changed files with 1 additions and 1 deletions
homeassistant/components/gtfs

View File

@ -122,7 +122,7 @@ def get_next_departure(
include_tomorrow: bool = False,
) -> dict:
"""Get the next departure for the given schedule."""
now = datetime.datetime.now() + offset
now = dt_util.now().replace(tzinfo=None) + offset
now_date = now.strftime(dt_util.DATE_STR_FORMAT)
yesterday = now - datetime.timedelta(days=1)
yesterday_date = yesterday.strftime(dt_util.DATE_STR_FORMAT)