BA 1497 then BA 490 at Heathrow
Glasgow → London → Gibraltar
Timetable, London time
07:15BA 1497 from Glasgow at the gate
06:45BA 490 to Gibraltar leaves the gate
23 h 30 apart on the timetable, overnight
BA 490 leaves 23 h 30 after BA 1497 arrives on the timetable: more than half a day, so not a connection we count.