Sadless74 / googletransitdatafeed

Automatically exported from code.google.com/p/googletransitdatafeed
0 stars 0 forks source link

Validation - Check that stop_times are in [0-9][0-9]:[0-5][0-9]:[0-5][0-9] format #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We need to check that the times in stop_times (if they exist) are in the
[0-2][0-9]:[0-5][0-9]:[0-5][0-9] format. For instance, a time of 21:17:60
should not appear in a feed.

Original issue reported on code.google.com by clancy.c...@gmail.com on 6 Nov 2008 at 10:18

GoogleCodeExporter commented 9 years ago
Reviewing under http://codereview.appspot.com/9473

Original comment by clancy.c...@gmail.com on 26 Nov 2008 at 5:41

GoogleCodeExporter commented 9 years ago
Committed to trunk.

Original comment by clancy.c...@gmail.com on 2 Dec 2008 at 10:25

GoogleCodeExporter commented 9 years ago
Note r941 used (\d{1,2}):([0-5]\d):([0-5]\d) so it accepts hours greater than 
29.

Original comment by tom.brow...@gmail.com on 3 Dec 2008 at 12:08

GoogleCodeExporter commented 9 years ago
Yes, that is true, but after looking at the spec, there is nothing saying that 
it
couldn't go past 29 hours. Is it possible that a trip could go for many days 
(i.e.
http://www.poezda.net/en/train_timetable?tr_code=769838%3A%D4+ the longest 
continuous
trip in the world from Kiev to Vladivostok). So, technically, there should be 
allowed
any number of hours for a stop time, but the spec does specify HH:MM:SS so the 
max
number of hours allowed by spec is 99. I have updated the title of this issue 
to be
correct.

Original comment by clancy.c...@gmail.com on 3 Dec 2008 at 11:30

GoogleCodeExporter commented 9 years ago
Since it's not clear from what you've written above, don't forget that the spec 
also
allows single-digit hours (i.e. "4:52:43").

Original comment by joe.hugh...@gmail.com on 3 Dec 2008 at 3:51