Comments (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 theservice_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
andstart_time=26:00:01
to match "run" A; - with
start_date=20230607
andstart_time=26:00:01
to match "run" B; - with
start_date=20230607
andstart_time=02:00:01
not to match anything (and render theTripUpdate
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.
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)
- Add rider_category_id to fare_products.txt
- Add maximum waiting time to transfers.txt HOT 2
- Documentation: inconsistencies between gtfs-realtime.proto
- GTFS-Fares v2: Improvement of filling with stops of a certain area HOT 3
- Move Dataset Publishing and General Practices from Best Practices to the spec HOT 12
- Add recommended presence: reconciling confusion between best practices and spec HOT 10
- Thoughts on forbidding "subfolder inside zip"? HOT 8
- GTFS-Flex: Service Discovery HOT 11
- Add rule_priority field to fare_leg_rules.txt HOT 7
- Add fare_media_type=1 to fare_media.txt HOT 8
- GTFS-Fares v2: Add networks.txt & route_networks.txt HOT 13
- GeoJSON in GTFS? (Or the future of GTFS serialisation) HOT 20
- Phone number international format in GTFS HOT 2
- stop_times.shapes_dist_traveled shouldn't be defined if the trip doesn't have shapes associated HOT 7
- GTFS changes - voting agents HOT 12
- Moving Schedule Best Practices into the Spec: Phasing Plan HOT 5
- [GTFS-Flex] Remove referencing location.geojson ids in stop_areas.txt (formerly location_groups.txt)? HOT 1
- [GTFS-Flex] Replace areas.txt/stop_areas.txt with locations.geojson MultiPoint feature to describe collections of stops? HOT 11
- GTFS-fares v2: Fare Leg Rule "Scope" Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transit.