opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.16k stars 1.02k forks source link

Open trip planner doesn't recognize timezones are the same #6016

Open ctriley opened 3 weeks ago

ctriley commented 3 weeks ago

When importing gtfs data, if the data is marked as different time zone aliases open trip planner doesn't understand that the aliases are the same. As an example

Expected behavior

Open trip planner should understand that US/Pacific is a pointer to America/Los_Angeles (see wikipedia screenshot) image

Observed behavior

java.lang.IllegalStateException: The graph contains agencies with different time zones: [America/Los_Angeles, US/Pacific]. Please configure the one to be used in the build-config.json

Version of OTP used (exact commit hash or JAR name)

2.5

optionsome commented 2 weeks ago

I'm not sure if we should normalize the timezones when reading in the data or when comparing that there aren't really different timezones defined for the transit model. Do you have any thoughts @t2gran ?

optionsome commented 2 weeks ago

I guess since we are exposing the timezone of the agency through the APIs, we might want to keep the original timezone as defined?

optionsome commented 1 week ago

We quickly discussed this in a dev meeting today. If you want to fix this issue, we are willing to accept pr. However, you can circumvent this issue by configuring the timezone in the build-config.json. In the future, we will probably support multiple timezones which will also fix this issue.