google / google/transit

TripDescriptor.start_date matching between GTFS-RT + GTFS-static

Open
#381 3 comments 0 reactions 0 assignees View on GitHub
GTFS Realtime Status: Stale
Dominant language
No language data
Stars
1.1k
Forks
225
Avg merge
7d 17h
Merged PRs (30d)
3

Description

Hi everyone!

I have a question regarding the `TripDescriptor.start_date`. Currently, the documentation tells me this:

https://gtfs.org/realtime/reference/#message-tripdescriptor

Two questions:

- Since the `start_date` timezone is not directly specified, I assume that it's in the corresponding agency timezone of the trip? 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? (to be translated like the GTFS-static data as described [here](https://gist.github.com/derhuerst/574edc94981a21ef0ce90713f1cff7f6)).
- 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)?

-----

### Example:

***`calendar_dates.txt`***
```
service_id,date,exception_type
S,20190331,1
```

**`trips.txt`**
```csv
route_id,service_id,trip_id,trip_headsign,block_id
R_RE1,S,T_RE1,RE 1,1
R_RE2,S,T_RE2,RE 2,1
```

**`stop_times.txt`**
```csv
trip_id,arrival_time,departure_time,stop_id,stop_sequence,pickup_type,drop_off_type
T_RE1,00:00:00,00:00:00,A,1,0,0
T_RE1,48:30:00,48:30:00,B,2,0,0
T_RE2,48:30:00,72:30:00,B,1,0,0
T_RE2,72:30:00,96:30:00,C,2,0,0
```

Now the first departure time of trip `T_RE2` would be on

| from `service_id` | UTC First Departure translated with offset at noon `-02:00` | Local First Departure |
|------------------------|-----------------------------|-----------------------------|
| 2019-03-31 | 2019-04-01 | 2019-04-02 |

I would guess that GTFS-RT is supposed to give me the date from `service_id` (2019-03-31) to refer to the trip. However, both other options would also be reasonable in a way.

----

I have not been able to get this information from the specification. Can someone please clarify how to handle these cases?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.