BA 158 then BA 490 at Heathrow
Hamilton → London → Gibraltar
Timetable, London time
07:15BA 158 from Hamilton 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 158 arrives on the timetable: more than half a day, so not a connection we count.