U2 8018 then U2 8317 at Gatwick
Madrid → London → Pisa
Timetable, London time
15:10U2 8018 from Madrid at the gate
09:00U2 8317 to Pisa leaves the gate
17 h 50 apart on the timetable, overnight
U2 8317 leaves 17 h 50 after U2 8018 arrives on the timetable: more than half a day, so not a connection we count.