Giter VIP home page Giter VIP logo

Comments (2)

derhuerst avatar derhuerst commented on May 28, 2024 2

(This is not Google's or MobilityData's position on this, merely my personal interpretation of the spec and the surrounding materials & discussions.)

Some fields in the specification are explicitly specified to be in UTC. For the rest I can assume that they refer to the GTFS-static local times?

Side note: As discussed very recently in #322, there is a different between agency_timezone and stop_timezone.

I would assume that all Time fields in GTFS that can be tied to an agency (e.g. stop_times.*, frequencies.*) are "relative to" the timezone specified in agency_timezone.


  • What happens in case the first departure time is greater than 24:00:00? The start date is the one specified in the service_id or the "real" start date (which would be for example on the next day)?

I would expect a TripDescriptor.start_time to always refer to the service day of the scheduled trip "run" in the corresponding GTFS Schedule dataset.

Let's consider a specific example: If there is a scheduled trip t1 with a first departure of 26:00:01 that runs on service days 20230606 ("run" A, effectively starting at 2023-06-07T02:00:01) and 20230607 ("run" A, effectively starting at 2023-06-08T02:00:01), I would expect a GTFS-RT TripDescriptor

  • with start_date=20230606 and start_time=26:00:01 to match "run" A;
  • with start_date=20230607 and start_time=26:00:01 to match "run" B;
  • with start_date=20230607 and start_time=02:00:01 not to match anything (and render the TripUpdate invalid).

If my assumptions are right, then technically the TripDestriptor.start_{date,time} merely describe a local (as in "wall clock time") date+time, as the timezone is only indirectly implied via the GTFS Schedule dataset's agency_timezone. Therefore, start_{date,time} are to be treated rather like a foreign key uniquely referencing a single "run" in the GTFS Schedule dataset.

from transit.

felixguendling avatar felixguendling commented on May 28, 2024

Thank you very much @derhuerst! I think it absolutely makes sense if you interpret start_date more like a database key (derived from service_id via calendar_dates.txt and calendar.txt entries, no matter if the first departure from stop_times.txt is greater or smaller than 24:00:00) and not like a real date identifying the day on which the trip has its first departure (in whatever timezone). It might make sense to add a clarification to the standard and leave the issue open until then?

from transit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.