UX 1013 then U2 871 at Gatwick
Madrid → London → Glasgow
Timetable, London time
09:00UX 1013 from Madrid at the gate
07:05U2 871 to Glasgow leaves the gate
22 h 05 apart on the timetable, overnight
U2 871 leaves 22 h 05 after UX 1013 arrives on the timetable: more than half a day, so not a connection we count.