U2 810 then U2 8517 at Gatwick
Edinburgh → London → Lisbon
Timetable, London time
16:35U2 810 from Edinburgh at the gate
16:20U2 8517 to Lisbon leaves the gate
23 h 45 apart on the timetable, overnight
U2 8517 leaves 23 h 45 after U2 810 arrives on the timetable: more than half a day, so not a connection we count.