BA 961 then BA 506 at Heathrow
Hamburg → London → Lisbon
Timetable, London time
12:20BA 961 from Hamburg at the gate
11:55BA 506 to Lisbon leaves the gate
23 h 35 apart on the timetable, overnight
BA 506 leaves 23 h 35 after BA 961 arrives on the timetable: more than half a day, so not a connection we count.