vingerha / gtfs2

Support GTFS in Home Assistant GUI-only
https://github.com/vingerha/gtfs2
MIT License
81 stars 7 forks source link

[Bug]: Realtime time format & delay data calculation #112

Open mxbssn opened 3 hours ago

mxbssn commented 3 hours ago

Own Analysis

A clear and concise description of what the bug is.

I have noticed that the time format for the Real time is different than the one given for the scheduled one, therefore the integration is unable to provide with the delay between the real-time and the scheduled one...   So the delay calculated always shows 0

Unable to add a screenshot, so here's the data :

Gtfs updated at
2 November 2024 at 12:08:55
Offset
0
Next departures lines
- departure: '12:16'
departure_realtime: '2024-11-02T11:16:45+00:00'
delay_realtime: 0
date: '2024-11-02'
stop_name: HOTEL DE VILLE
route: L1
route_long: '1'
headsign: Moulins Tournebride
trip_id: '1_62062590'
direction_id: 1
icon: mdi:bus
- departure: '12:31'
departure_realtime: '2024-11-02T11:29:46+00:00'
delay_realtime: 0
date: '2024-11-02'

Provide details on the data source(s)

GTFS: https://data.lemet.fr/documents/LEMET-gtfs.zip

Realtime : https://proxy.transport.data.gouv.fr/resource/lemet-metz-gtfs-rt-trip-update

Config in case of setup using start / stop station

No response

Config in case of setup using location based departures

L1 LITALDU2 (local stop)
49,10016939409462
6,151061654090882

Info on your installed version

0.5.2 HAOS

Relevant log output

No response

vingerha commented 2 hours ago

This was already the case in 0.5.1 and earlier and tbh I am sure I had a reason for it but no longer sure which :) From a HA basics perspective the UTC version is the one to use but when in cards, it is not always easy to display without lots of additional coding, so it is either BOTH times in UTC with TZ or both without.