juliuste / bahn.guru

Deutsche Bahn ticket price calendar.
https://bahn.guru
ISC License
379 stars 22 forks source link

Time traveling is possible #35

Open UnlimitedCookies opened 1 year ago

UnlimitedCookies commented 1 year ago

image

The link: https://bahn.guru/day?origin=HAMBURG&destination=K%C3%96LN&class=1&bc=2&age=Y&date=04.07.2023

What happened here?

soerface commented 1 year ago

Heyho,

I figured out that it's not a bug in bahn.guru, but in hafas-client. The bug happens when:

In this case, the parts of the journey that are taking place on the next day, are reported by hafas-client to happen on your departure day. Therefore, it looks to bahn.guru as if the journey ended in the early morning of your departure day.

I've opened an issue over at hafas-client and created a test which reproduces the bug, but I'm not yet sure how to fix it: https://github.com/public-transport/hafas-client/issues/301