U2 854 then U2 8651 at Gatwick
Edinburgh → London → Paphos
Timetable, London time
09:55U2 854 from Edinburgh at the gate
07:15U2 8651 to Paphos leaves the gate
21 h 20 apart on the timetable, overnight
U2 8651 leaves 21 h 20 after U2 854 arrives on the timetable: more than half a day, so not a connection we count.