diff --git a/marudor_departures.py b/marudor_departures.py index d034a27..84999b1 100644 --- a/marudor_departures.py +++ b/marudor_departures.py @@ -1,6 +1,5 @@ import re -from datetime import timezone, timedelta - +from pytz import timezone import requests from dateutil.parser import parse @@ -69,7 +68,7 @@ def build_reply(departures: list) -> list: reply = [f'Next departures for station: {departures[0]["currentStation"]["title"]}'] for departure in departures: reply_text = f'{departure["train"]["name"]} to "{departure["destination"]}" at ' \ - f'{parse(departure["departure"]["time"]).astimezone(timezone(timedelta(hours=1))).strftime("%H:%M")}' + f'{parse(departure["departure"]["time"]).astimezone(timezone("Europe/Berlin")).strftime("%H:%M")}' if 'delay' in departure['departure']: reply_text += f' (+{str(departure["departure"]["delay"])})'