U2 8638 then U2 804 at Gatwick
Munich → London → Edinburgh
Timetable, London time
16:55U2 8638 from Munich at the gate
16:00U2 804 to Edinburgh leaves the gate
23 h 05 apart on the timetable, overnight
U2 804 leaves 23 h 05 after U2 8638 arrives on the timetable: more than half a day, so not a connection we count.