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