You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GTFS generator script doesn't take into account extra hour on day the clocks are put backwards and doesn't take into account 1 hour less on day the clocks are put 1 hour forward
How to replicate
Load the GTFS feed in any system and check the departure and arrival times on the days the hour change from winter → summer time and vice versa.
I used gtfs2lc to generate connections from this GTFS file.
Examples
2016-03-27: Summer hour (UTC+2) on the day the clocks were set 1 hour forward
{"@type":"Connection","departureStop":"http://irail.be/stations/NMBS/008811221","arrivalStop":"http://irail.be/stations/NMBS/008811213",// Forgot to substract 1 hour as clocks were set forward"departureTime":{"$date":"2016-03-27T22:47:00.000Z"},// → localtime: 2016-03-28T00:47 ==> should have been 2016-03-27T23:47"arrivalTime":{"$date":"2016-03-27T22:50:00.000Z"},"gtfs:trip":"http://irail.be/trips/IC19453391","gtfs:route":"http://irail.be/vehicle/IC1945","_id":"http://irail.be/connections/8811221/20160328/IC1945"}
For the next day, the hour is generated correctly, as no 1 hour disappeared from the day. However, now the identifiers for this departure conflict (which is a big problem for the iRail code base)
{"@type":"Connection","departureStop":"http://irail.be/stations/NMBS/008811221","arrivalStop":"http://irail.be/stations/NMBS/008811213","departureTime":{"$date":"2016-03-28T21:47:00.000Z"},// → Correct local departureTime: 2016-03-28T23:47"arrivalTime":{"$date":"2016-03-28T21:50:00.000Z"},"gtfs:trip":"http://irail.be/trips/IC19453391","gtfs:route":"http://irail.be/vehicle/IC1945","_id":"http://irail.be/connections/8811221/20160328/IC1945"}
2016-10-30: Winter hour (UTC+1) on the day the clocks were set 1 hour backward
Correct day on the 29th, on which we are still on summer time (UTC+2):
{"@type":"Connection","departureStop":"http://irail.be/stations/NMBS/008811213","arrivalStop":"http://irail.be/stations/NMBS/008811221","departureTime":{"$date":"2016-10-29T22:12:00.000Z"},// → Correct local time: 2016-10-30T00:12:00.000"arrivalTime":{"$date":"2016-10-29T22:15:00.000Z"},"gtfs:trip":"http://irail.be/trips/IC192249921","gtfs:route":"http://irail.be/vehicle/IC1922","_id":"http://irail.be/connections/8811213/20161030/IC1922"}
However, on the 30th of October, we forgot to add an hour, as the day lasted 1 hour longer:
{"@type":"Connection","departureStop":"http://irail.be/stations/NMBS/008811213","arrivalStop":"http://irail.be/stations/NMBS/008811221","departureTime":{"$date":"2016-10-30T22:12:00.000Z"},// → Wrong local time as the day lasted 1 hour longer: 2016-10-30T23:12 ==> should have been 2016-10-31T00:12"arrivalTime":{"$date":"2016-10-30T22:15:00.000Z"},"gtfs:trip":"http://irail.be/trips/IC192249921","gtfs:route":"http://irail.be/vehicle/IC1922","_id":"http://irail.be/connections/8811213/20161030/IC1922"}
Suggested solution
When crossing 3 am, we should start adding or subtracting an hour to the hour we found. However, for the schedules between 2 and 3 am on the 30th of October, I'm not sure what actually happens on the website of SNCB. To be checked!
The text was updated successfully, but these errors were encountered:
The fix is easier than I thought as no trains appear to drive after 1:45. We can just say: everything after 3am gets 1 hour added on the last Sunday of October.
1 hour should be subtracted on the last Sunday of March of each year.
Problem
The GTFS generator script doesn't take into account extra hour on day the clocks are put backwards and doesn't take into account 1 hour less on day the clocks are put 1 hour forward
How to replicate
Load the GTFS feed in any system and check the departure and arrival times on the days the hour change from winter → summer time and vice versa.
I used gtfs2lc to generate connections from this GTFS file.
Examples
2016-03-27: Summer hour (UTC+2) on the day the clocks were set 1 hour forward
For the next day, the hour is generated correctly, as no 1 hour disappeared from the day. However, now the identifiers for this departure conflict (which is a big problem for the iRail code base)
2016-10-30: Winter hour (UTC+1) on the day the clocks were set 1 hour backward
Correct day on the 29th, on which we are still on summer time (UTC+2):
However, on the 30th of October, we forgot to add an hour, as the day lasted 1 hour longer:
Suggested solution
When crossing 3 am, we should start adding or subtracting an hour to the hour we found. However, for the schedules between 2 and 3 am on the 30th of October, I'm not sure what actually happens on the website of SNCB. To be checked!
The text was updated successfully, but these errors were encountered: