BA 138 then BA 490 at Heathrow
Mumbai → London → Gibraltar
Timetable, London time
07:05BA 138 from Mumbai at the gate
07:00BA 490 to Gibraltar leaves the gate
23 h 55 apart on the timetable, overnight
BA 490 leaves 23 h 55 after BA 138 arrives on the timetable: more than half a day, so not a connection we count.