The notebook index
Earlier notes
Earlier reference notes remain available at their existing addresses. The current blog concentrates on programming languages, protocols and self-hosted software.
310 notes.
- Why Can a Transit Service Day Extend Past Midnight?
Transit schedules can keep one service day open after midnight, so a time such as 25:10 means 1:10 a.m. on the following calendar day.
- How Do GTFS Calendar Files Determine a Trip’s Service Date?
A trip’s service date comes from matching its service identifier against weekday rules and date-specific additions or removals.
- What Is the Difference Between a Schedule and a Prediction?
A schedule states a planned time; a prediction estimates when a vehicle is likely to arrive based on current information.
- How Should Software Parse Times Greater Than 24:00?
Parse extended transit times as a service-day offset plus a time of day, preserving their original schedule meaning.
- How Do Daylight-Saving Changes Affect Local Schedules?
Local schedules depend on an agency’s time zone, whose clock rules can create missing or repeated local times during seasonal transitions.
- Why Does a Published Schedule Need an Effective Date?
An effective date tells readers when a schedule applies, helping them spot old timetable data and interpret service correctly.
- How Can a Reader Find a Trip Across Midnight?
Search for an overnight journey using its service date, then account for arrival times that fall on the next calendar day.
- What Does a GTFS Calendar Exception Change?
A date-specific GTFS calendar exception adds or removes a service identifier on a particular date, modifying the regular weekday pattern.
- How Should a Schedule Tool Handle an Unknown Time Zone?
When a schedule’s time zone is unknown, disclose the gap and its source instead of silently choosing a plausible zone.
- When Should an App Convert UTC Timestamps to Local Time?
Keep timestamps unambiguous in storage, then convert them to the appropriate local time when presenting them to a person.
- How Can You Compare Two Schedules Across Time Zones?
Compare converted instants on a shared timeline while retaining each schedule’s local service date, zone, and original values.
- What Does a Frequency-Based Transit Trip Mean?
Frequency-based service describes departures through an interval or headway, which may not enumerate every individual departure time.
- How Do You Display an Overnight Schedule Clearly?
Group overnight trips by service day and label after-midnight arrivals so the date and time convention remain clear.
- How Should a Countdown Handle a Clock Change?
Calculate time remaining between instants, not by subtracting local clock labels that may jump or repeat.
- What Is the Safest Way to Round a Departure Time?
Round a departure only in its presentation, retaining the precise scheduled value for ordering and all downstream calculations.
- How Can a Schedule Reader Detect a Holiday Service Change?
A reliable holiday check combines the weekday calendar with date-specific additions and removals before deciding which trips operate.
- Why Might Two Agencies Define Their Service Days Differently?
A service day is a scheduling convention, so comparing feeds requires checking their documentation and interpreting times in each feed’s context.
- How Do You Sort Times That Pass Midnight?
Clock text alone sorts poorly across midnight; use elapsed service-day values or fully resolved date-time values while preserving the original schedule notation.
- What Should a Schedule Export Say About Its Time Zone?
An export should identify the time zone or explicit offset used to interpret each timestamp, especially when local schedule values become dated events.
- How Can Developers Test a 26:00:00 Schedule Time?
A focused fixture should verify that 26:00:00 remains a valid service-day value and resolves to 02:00 on the next calendar day.
- How Do Schedule Changes Affect Cached Results?
Cache schedule answers with both the feed version and the service date so refreshed data and date-specific service rules do not collide.
- What Is the Difference Between Arrival Time and Departure Time in a Stop Record?
Arrival and departure are distinct scheduled events at a stop; either field may be absent where the schedule’s rules and context allow it.
- How Should a Tool Describe an Unscheduled Transfer?
A transfer description should distinguish an explicit guarantee or timed connection from a merely possible itinerary assembled from schedule times.
- How Can a Reader Check Whether a Trip Runs Today?
Resolve the correct local service date, check the recurring calendar, then apply any date-specific exceptions before listing a trip.
- Why Do Published Schedule Times Need Seconds?
Retaining seconds preserves the source schedule’s precision and ordering, even when a rider-facing display chooses to round to minutes.
- How Should a Timetable Show an Ambiguous Local Time?
When a clock change repeats a local time, include enough date, offset, or zone detail for readers to distinguish the two events.
- Can a Date Picker Mislead for Overnight Transit?
A date picker should say whether it selects a calendar date or a transit service date, because an overnight trip can belong to one and occur on the other.
- How Do You Document a Schedule’s Update Cadence?
Document how often schedule data is expected to refresh, what a successful retrieval means, and when the current feed was last fetched successfully.
- What Is a Practical Exercise for Reading GTFS Stop Times?
Trace a single trip from its stop-time rows to its service calendar, then use the exercise to practice sequence, date, and overnight-time interpretation.
- How Should a Public Schedule Tool Treat Invalid Time Values?
Reject malformed schedule times with a specific diagnostic, and preserve the raw value so the feed can be investigated without silent repair.