entur / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
25 stars 10 forks source link

Departure timestamp ISO format? #96

Closed holmbuar closed 3 years ago

holmbuar commented 3 years ago

Pardon if this is not the correct repo for this issue. I just have a small nitpick/question regarding the timestamp returned from the GraphQl API query results.

Expected behavior

An RFC3339 timestamp RFC3339 "aimedDepartureTime": "2020-11-26T09:45:00+01:00". or eventually "aimedDepartureTime": "2020-11-26T09:45:00Z".

Observed behavior

A "near RFC3339" timestamp like "aimedDepartureTime": "2020-11-26T09:45:00+0100"

The "problem" is the missing colon hh:mm in the time zone offset. Using for example Go, calling time.Parse(time.RFC3339, "2020-11-26T09:45:00+0100") results in an invalid value vs. layout error. In order to parse the string into a time value, the query result string itself needs parsing first.

Steps to reproduce the problem

Any accepted graphQL query to Journey Planner API

t2gran commented 3 years ago

Hi, we changed this in the latest version of the API. We are not changing the v2 version, because it might break for some of the clients.

https://api.entur.io/graphql-explorer/journey-planner-v3-beta

holmbuar commented 3 years ago

ok thanks, where can I find the repo or branch for v3 of the API?

holmbuar commented 3 years ago

I am interested in tracking the progress of the v3 beta, that is the reason for asking.

t2gran commented 3 years ago

You should be able to track it in the OTP main repo , branch dev-2.x:

We have a few "in progress feature branches" that we merges into this before we deploy it, but we do not have a "stable" branch in the Entur repo, so I think that is the best place for you to track the API changes. Right now, submodes are not merged into the main branch.

Also, there is a few Slack channels that is open to Entur partners/customers.