peter-mount / nre-feeds

go library & Application for handling the NRE DarwinD3 feeds
Apache License 2.0
8 stars 0 forks source link

Service appears twice in the feeds #18

Open peter-mount opened 5 years ago

peter-mount commented 5 years ago

Only noticed this on a ukdepartureboards desktop unit (departureboards.mobi doesn't show it) but a service appears twice in the feeds, one as arrive and the other as on time. It seems that the previous day's service is still showing:

Incorrect one: RID 201906198783558 SSD 2019-06-19 Correct one: RID 201906208783558 SSD 2019-06-20

Seen at 00:46 on the 20th, so the one from the 19th is incorrect and the api shouldn't be showing it in the response.

peter-mount commented 5 years ago

Here's the full response when I saw it:

{
  "crs": "MDE",
  "departures": [
    {
      "rid": "201906198783552",
      "destination": "ASHFKY",
      "origin": {
        "type": "OR",
        "tiploc": "VICTRIE",
        "displaytime": "23:56:00",
        "timetable": {
          "time": "23:55:00",
          "ptd": "23:55",
          "wtd": "23:55:00"
        },
        "planned": {
          "activity": "TB"
        },
        "forecast": {
          "time": "23:56:00",
          "departed": true,
          "arr": null,
          "dep": {
            "at": "23:56:00",
            "src": "TD"
          },
          "pass": null,
          "plat": {
            "plat": "5",
            "suppressed": true,
            "source": "M"
          },
          "suppressed": true,
          "date": "2019-06-19T23:56:33.6853395+01:00"
        },
        "length": 4,
        "delay": 60,
        "loading": null
      },
      "dest": {
        "type": "DT",
        "tiploc": "ASHFKY",
        "displaytime": "01:23:00",
        "timetable": {
          "time": "01:23:00",
          "pta": "01:23",
          "wta": "01:23:00"
        },
        "planned": {
          "activity": "TF"
        },
        "forecast": {
          "time": "01:23:00",
          "arr": {
            "et": "01:23:00",
            "src": "Darwin"
          },
          "dep": null,
          "pass": null,
          "plat": {
            "plat": "6"
          },
          "date": "2019-06-20T00:35:14.7469395+01:00"
        },
        "length": 4,
        "delay": 0,
        "loading": null
      },
      "terminates": {
        "type": "DT",
        "tiploc": "ASHFKY",
        "displaytime": "01:23:00",
        "timetable": {
          "time": "01:23:00",
          "pta": "01:23",
          "wta": "01:23:00"
        },
        "planned": {
          "activity": "TF"
        },
        "forecast": {
          "time": "01:23:00",
          "arr": {
            "et": "01:23:00",
            "src": "Darwin"
          },
          "dep": null,
          "pass": null,
          "plat": {
            "plat": "6",
            "suppressed": true,
            "cisSuppressed": true
          },
          "date": "2019-06-19T21:55:11.1863395+01:00"
        },
        "length": 4,
        "delay": 0,
        "loading": null
      },
      "ssd": "2019-06-19",
      "trainId": "2N86",
      "toc": "SE",
      "passengerService": true,
      "cancelReason": {
        "reason": 0
      },
      "lateReason": {
        "reason": 0
      },
      "location": {
        "type": "IP",
        "tiploc": "MSTONEE",
        "displaytime": "00:59:00",
        "timetable": {
          "time": "00:59:00",
          "pta": "00:57",
          "ptd": "00:59",
          "wta": "00:57:00",
          "wtd": "00:59:00"
        },
        "planned": {
          "activity": "T "
        },
        "forecast": {
          "time": "00:59:00",
          "arr": {
            "et": "00:57:00",
            "src": "Darwin"
          },
          "dep": {
            "et": "00:59:00",
            "src": "Darwin"
          },
          "pass": null,
          "plat": {
            "plat": "2"
          },
          "date": "2019-06-20T00:38:13.3357395+01:00"
        },
        "length": 4,
        "delay": 0,
        "loading": null
      },
      "calling": [
        {
          "tpl": "ASHFKY",
          "time": "01:23:00",
          "delay": 0
        }
      ],
      "lastReport": {
        "tpl": "BORWGAW",
        "time": "00:40:00",
        "delay": 0,
        "departed": true
      },
      "association": null,
      "formation": {
        "rid": "",
        "formation": {
          "fid": "",
          "coaches": null,
          "date": "0001-01-01T00:00:00Z"
        },
        "date": "0001-01-01T00:00:00Z"
      },
      "locind": 27,
      "date": "2019-06-20T00:43:01.5925395+01:00"
    },
    {
      "rid": "201906198783558",
      "destination": "ASHFKY",
      "origin": {
        "type": "OR",
        "tiploc": "VICTRIE",
        "displaytime": "00:27:00",
        "timetable": {
          "time": "00:25:00",
          "ptd": "00:25",
          "wtd": "00:25:00"
        },
        "planned": {
          "activity": "TB"
        },
        "forecast": {
          "time": "00:27:00",
          "departed": true,
          "arr": null,
          "dep": {
            "at": "00:27:00",
            "src": "TD"
          },
          "pass": null,
          "plat": {
            "plat": "8",
            "suppressed": true,
            "source": "M"
          },
          "suppressed": true,
          "date": "2019-06-19T00:27:58.3859201+01:00"
        },
        "length": 8,
        "delay": 120,
        "loading": null
      },
      "dest": {
        "type": "DT",
        "tiploc": "ASHFKY",
        "displaytime": "01:59:00",
        "timetable": {
          "time": "01:58:00",
          "pta": "02:01",
          "wta": "01:58:00"
        },
        "planned": {
          "activity": "TF"
        },
        "forecast": {
          "time": "01:59:00",
          "arrived": true,
          "arr": {
            "at": "01:59:00",
            "src": "TD"
          },
          "dep": null,
          "pass": null,
          "plat": {
            "plat": "1",
            "confirmed": true,
            "source": "A"
          },
          "date": "2019-06-19T01:58:57.7931201+01:00"
        },
        "length": 8,
        "delay": 60,
        "loading": null
      },
      "terminates": {
        "type": "DT",
        "tiploc": "ASHFKY",
        "displaytime": "02:01:00",
        "timetable": {
          "time": "01:58:00",
          "pta": "02:01",
          "wta": "01:58:00"
        },
        "planned": {
          "activity": "TF"
        },
        "forecast": {
          "time": "02:01:00",
          "arr": {
            "et": "02:01:00",
            "wet": "01:58:00",
            "src": "Darwin"
          },
          "dep": null,
          "pass": null,
          "plat": {
            "plat": "2",
            "suppressed": true,
            "cisSuppressed": true,
            "source": "M"
          },
          "date": "2019-06-18T22:26:56.8228563+01:00"
        },
        "length": 8,
        "delay": 180,
        "loading": null
      },
      "ssd": "2019-06-19",
      "trainId": "2N88",
      "toc": "SE",
      "passengerService": true,
      "cancelReason": {
        "reason": 0
      },
      "lateReason": {
        "reason": 0
      },
      "location": {
        "type": "IP",
        "tiploc": "MSTONEE",
        "displaytime": "01:26:00",
        "timetable": {
          "time": "01:27:00",
          "pta": "01:25",
          "ptd": "01:27",
          "wta": "01:25:00",
          "wtd": "01:27:00"
        },
        "planned": {
          "activity": "T "
        },
        "forecast": {
          "time": "01:26:00",
          "arrived": true,
          "departed": true,
          "arr": {
            "at": "01:23:00",
            "src": "TD"
          },
          "dep": {
            "at": "01:26:00",
            "src": "TD"
          },
          "pass": null,
          "plat": {
            "plat": "2",
            "confirmed": true,
            "source": "A"
          },
          "date": "2019-06-19T01:26:50.5847201+01:00"
        },
        "length": 8,
        "delay": -60,
        "loading": null
      },
      "calling": null,
      "lastReport": {
        "tpl": "ASHFKY",
        "time": "01:59:00",
        "delay": 60,
        "at": true
      },
      "association": null,
      "formation": {
        "rid": "",
        "formation": {
          "fid": "",
          "coaches": null,
          "date": "0001-01-01T00:00:00Z"
        },
        "date": "0001-01-01T00:00:00Z"
      },
      "locind": 27,
      "date": "2019-06-19T01:58:57.7931201+01:00"
    },
    {
      "rid": "201906208783558",
      "destination": "ASHFKY",
      "origin": {
        "type": "OR",
        "tiploc": "VICTRIE",
        "displaytime": "00:25:00",
        "timetable": {
          "time": "00:25:00",
          "ptd": "00:25",
          "wtd": "00:25:00"
        },
        "planned": {
          "activity": "TB"
        },
        "forecast": {
          "time": "00:25:00",
          "departed": true,
          "arr": null,
          "dep": {
            "at": "00:25:00",
            "src": "TD"
          },
          "pass": null,
          "plat": {
            "plat": "4",
            "suppressed": true,
            "source": "M"
          },
          "suppressed": true,
          "date": "2019-06-20T00:25:37.5157395+01:00"
        },
        "length": 8,
        "delay": 0,
        "loading": null
      },
      "dest": {
        "type": "DT",
        "tiploc": "ASHFKY",
        "displaytime": "02:01:00",
        "timetable": {
          "time": "01:58:00",
          "pta": "02:01",
          "wta": "01:58:00"
        },
        "planned": {
          "activity": "TF"
        },
        "forecast": {
          "time": "02:01:00",
          "arr": {
            "et": "02:01:00",
            "wet": "01:58:00",
            "src": "Darwin"
          },
          "dep": null,
          "pass": null,
          "plat": {
            "plat": "6",
            "suppressed": true,
            "cisSuppressed": true
          },
          "date": "2019-06-19T22:25:31.5035395+01:00"
        },
        "length": 8,
        "delay": 180,
        "loading": null
      },
      "terminates": {
        "type": "DT",
        "tiploc": "ASHFKY",
        "displaytime": "02:01:00",
        "timetable": {
          "time": "01:58:00",
          "pta": "02:01",
          "wta": "01:58:00"
        },
        "planned": {
          "activity": "TF"
        },
        "forecast": {
          "time": "02:01:00",
          "arr": {
            "et": "02:01:00",
            "wet": "01:58:00",
            "src": "Darwin"
          },
          "dep": null,
          "pass": null,
          "plat": {
            "plat": "6",
            "suppressed": true,
            "cisSuppressed": true
          },
          "date": "2019-06-19T22:25:31.5035395+01:00"
        },
        "length": 8,
        "delay": 180,
        "loading": null
      },
      "ssd": "2019-06-20",
      "trainId": "2N88",
      "toc": "SE",
      "passengerService": true,
      "cancelReason": {
        "reason": 0
      },
      "lateReason": {
        "reason": 0
      },
      "location": {
        "type": "IP",
        "tiploc": "MSTONEE",
        "displaytime": "01:27:00",
        "timetable": {
          "time": "01:27:00",
          "pta": "01:25",
          "ptd": "01:27",
          "wta": "01:25:00",
          "wtd": "01:27:00"
        },
        "planned": {
          "activity": "T "
        },
        "forecast": {
          "time": "01:27:00",
          "arr": {
            "et": "01:25:00",
            "src": "Darwin"
          },
          "dep": {
            "et": "01:27:00",
            "src": "Darwin"
          },
          "pass": null,
          "plat": {
            "plat": "2"
          },
          "date": "2019-06-20T00:43:39.1417395+01:00"
        },
        "length": 8,
        "delay": 0,
        "loading": null
      },
      "calling": [
        {
          "tpl": "ASHFKY",
          "time": "02:01:00",
          "delay": 180
        }
      ],
      "lastReport": {
        "tpl": "BICKLEY",
        "time": "00:43:00",
        "delay": 0,
        "passed": true
      },
      "association": null,
      "formation": {
        "rid": "",
        "formation": {
          "fid": "",
          "coaches": null,
          "date": "0001-01-01T00:00:00Z"
        },
        "date": "0001-01-01T00:00:00Z"
      },
      "locind": 27,
      "date": "2019-06-20T00:43:39.1417395+01:00"
    }
  ],
  "station": [
    "MSTONEE"
  ],
  "tiploc": {
    "ASHFKY": {
      "tpl": "ASHFKY",
      "crs": "AFK",
      "toc": "SE",
      "locname": "Ashford International",
      "station": false,
      "date": "2019-03-22T19:27:20.643122402Z",
      "self": "https://ref.a.a51.li/tiploc/ASHFKY"
    },
    "BICKLEY": {
      "tpl": "BICKLEY",
      "crs": "BKL",
      "toc": "SE",
      "locname": "Bickley",
      "station": false,
      "date": "2019-03-22T19:27:20.643122402Z",
      "self": "https://ref.a.a51.li/tiploc/BICKLEY"
    },
    "BORWGAW": {
      "tpl": "BORWGAW",
      "crs": "BRG",
      "toc": "SE",
      "locname": "Borough Green & Wrotham",
      "station": false,
      "date": "2019-03-22T19:27:20.643122402Z",
      "self": "https://ref.a.a51.li/tiploc/BORWGAW"
    },
    "MSTONEE": {
      "tpl": "MSTONEE",
      "crs": "MDE",
      "toc": "SE",
      "locname": "Maidstone East",
      "station": false,
      "date": "2019-03-22T19:27:20.643122402Z",
      "self": "https://ref.a.a51.li/tiploc/MSTONEE"
    },
    "VICTRIE": {
      "tpl": "VICTRIE",
      "crs": "VIC",
      "toc": "RT",
      "locname": "London Victoria",
      "station": false,
      "date": "2019-03-22T19:27:20.643122402Z",
      "self": "https://ref.a.a51.li/tiploc/VICTRIE"
    }
  },
  "toc": {
    "RT": {
      "toc": "RT",
      "tocname": "Network Rail",
      "url": "http://www.nationalrail.co.uk/tocs_maps/tocs/NR.aspx",
      "date": "2019-03-22T19:27:21.079908058Z",
      "self": "https://ref.a.a51.li/toc/RT"
    },
    "SE": {
      "toc": "SE",
      "tocname": "Southeastern",
      "url": "http://www.nationalrail.co.uk/tocs_maps/tocs/SE.aspx",
      "date": "2019-03-22T19:27:21.079743892Z",
      "self": "https://ref.a.a51.li/toc/SE"
    }
  },
  "messages": null,
  "reasons": null,
  "via": {},
  "date": "2019-06-20T00:43:49.279423713+01:00",
  "self": "https://ldb.a.a51.li/boards/MDE"
}