Skip to content

Commit

Permalink
Merge pull request #16 from tolmalev/patch-1
Browse files Browse the repository at this point in the history
Fix time_to_station for departed trains
  • Loading branch information
morosanmihail authored Dec 14, 2022
2 parents 8e67136 + 9ca64fa commit 2c81c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/london_tfl/tfl_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def time_to_station(entry, with_destination=True, style='{0}m {1}s'):
next_departure_time = (
parser.parse(entry['expectedArrival']).replace(tzinfo=None) -
datetime.utcnow().replace(tzinfo=None)
).seconds
).total_seconds()
next_departure_dest = get_destination(entry)
return style.format(
int(next_departure_time / 60),
Expand Down

0 comments on commit 2c81c27

Please sign in to comment.