BY 39 then U2 863 at Gatwick
Cancún → London → Glasgow
Timetable, London time
07:10BY 39 from Cancún at the gate
07:05U2 863 to Glasgow leaves the gate
23 h 55 apart on the timetable, overnight
U2 863 leaves 23 h 55 after BY 39 arrives on the timetable: more than half a day, so not a connection we count.