Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stoptimes are off by one day at night #106

Open
PasiSalenius opened this issue Jan 7, 2017 · 0 comments
Open

Stoptimes are off by one day at night #106

PasiSalenius opened this issue Jan 7, 2017 · 0 comments

Comments

@PasiSalenius
Copy link

PasiSalenius commented Jan 7, 2017

Querying stoptimes for route 110T at around 01 AM 08.01.2016 using

{
  trip(id: "HSL:2110T_20170102_La_2_2445") {
    stoptimesForDate(serviceDay: "20170108") {
      stop {
        gtfsId
      }
      scheduledArrival
      realtimeArrival
      scheduledDeparture
      realtimeDeparture
      serviceDay
      realtime
    }
  }
}

returns the first stoptime as follows

{
  "stop": {
    "gtfsId": "HSL:2111230"
  },
  "scheduledArrival": 89100,
  "realtimeArrival": 89100,
  "scheduledDeparture": 89100,
  "realtimeDeparture": 89100,
  "serviceDay": 1483826400,
  "realtime": false
}

The serviceDay + scheduledDeparture sum 1483915500 converts to 01/08/2017 @ 10:45pm (UTC) which in Finnish time equals 1/9/2017, 12:45:00 AM GMT+2:00.

It seems to be because of incorrect serviceDay: "20170108" in the query. Do you have any suggestions how to handle such queries near day changes?

edit:
On further inspection there's nothing wrong in the graphQL data, only it is now difficult to tell the start date for a trip without always including full list of stoptimes in the query and checking the first one. Would be very helpful to have a startDate property available in Trip itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant