How to find the last update time or publish time of GTFS Schedule dataset

42 views
Skip to first unread message

David Wu

unread,
Sep 29, 2022, 1:46:35 PMSep 29
to GTFS-realtime
I apologize that this is not question about GTFS-RT or it has been discussed in the past.

To avoid unnecessary processing of stale 'static' GTFS Schedule  dataset, I need to find out when a GTFS Schedule dataset was published or last updated.

In some cases, I can check the time stamp of the zip file, but that doesn't work in other cases.

The GTFS Schedule standard does specify a feed_info.txt file, which can be used but it's an optional file and I don't find it in sources I have to deal with.


Thanks,
David

Stefan de Konink

unread,
Sep 29, 2022, 2:08:42 PMSep 29
to gtfs-r...@googlegroups.com
"Changed" is a big word. What about the default HTTP methods for this. A
producer would love you to use the Etags to avoid downloading a file
altogether if it has not been modified.

--
Stefan

Leonard Ehrenfried

unread,
Sep 29, 2022, 3:00:54 PMSep 29
to gtfs-r...@googlegroups.com
Stefan is right. HTTP has ways to tell you if a file has changed. Let me also mention the Last-Modified header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified

--
Leonard Ehrenfried
ma...@leonard.io - https://leonard.io
> --
> You received this message because you are subscribed to the Google
> Groups "GTFS-realtime" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to gtfs-realtim...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gtfs-realtime/902f8896-9fdf-4f0e-9bf1-5bc93e173252%40konink.de.

David Wu

unread,
Sep 30, 2022, 10:58:56 AMSep 30
to GTFS-realtime
Thanks Stefan and Leonard.
I currently deal with 2 feeds, one has last-modified header and one doesn't, that was why I asked this question.

Thanks,
David

Reply all
Reply to author
Forward
0 new messages