U2 8064 then U2 807 at Gatwick
Barcelona → London → Edinburgh
Timetable, London time
08:35U2 8064 from Barcelona at the gate
08:30U2 807 to Edinburgh leaves the gate
23 h 55 apart on the timetable, overnight
U2 807 leaves 23 h 55 after U2 8064 arrives on the timetable: more than half a day, so not a connection we count.