juliuste / direkt.bahn.guru

All direct long-distance railway connections for cities in and beyond central Europe.
https://direkt.bahn.guru
GNU General Public License v3.0
364 stars 24 forks source link

Times offset in some countries - timezone issue? #29

Open DFEvans opened 1 year ago

DFEvans commented 1 year ago

Searching locations in the UK, Ireland, and Portugal (at least) gives values that are offset by one hour.

For example, it should not take an hour to reach locations in central London from Kings Cross: https://direkt.bahn.guru/?origin=7001370

Nor locations near Dublin from Connolly station: https://direkt.bahn.guru/?origin=6000043

Nor locations in Lisbon from Entrecampos station: https://direkt.bahn.guru/?origin=9400289

(Oddly, this doesn't seem to be universal - the couple of countries in +2 timezones I checked seem to have sensible results)

jgraham commented 4 months ago

I notice that Paris Nord to London St Pancras gives the correct time, but London St Pancras to Paris Nord gives a time that's one hour too long.

gijsk commented 4 months ago

It looks like this is the frontend repo and it just outputs a duration value provided by the backend repo. The code at https://github.com/juliuste/api.direkt.bahn.guru/blob/9cbf5f2b573397cff96ccd5263acf9a71a326509/src/reachableFrom.js#L63 seems to be doing some of the maths here.