Closed spaceboots23 closed 1 week ago
What was your problem ? What Timezone is set on your HA server ?
The problem was that the API is returning the unix timestamp 1725461340000 (Wed Sep 04 2024 14:49:00 GMT+0000 / Wed Sep 04 2024 16:49:00 GMT+0200) and depending on the settings we have to convert it to ME(S)Z If your server is set to Europe/Berlin, there is no convertion needed. But at least for UTC time zone settings on the server I had to replace the time zone. At least this was the idea to replace the time zone information
All of the arrival/departure times were showing as CEST -2hrs (I suspect that means they were showing as UTC). With the above update they now display as you describe in the readme, when using the from/to flags.
Server settings:
Local time: Wed 2024-09-04 17:21:25 CEST
Universal time: Wed 2024-09-04 15:21:25 UTC
RTC time: Wed 2024-09-04 15:21:25
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Maybe I should test a little bit more. ^^ Thx for the fix, I have it already included in my local version.
Hahaha that's what users are for ;) happy to help!
Timezone function doesn't work as intended, but can be fixed by updating the function
.replace()
with.astimezone()
:Old:
New: