BA 54 then BA 962 at Heathrow
Johannesburg → London → Hamburg
Timetable, London time
06:55BA 54 from Johannesburg at the gate
06:45BA 962 to Hamburg leaves the gate
23 h 50 apart on the timetable, overnight
BA 962 leaves 23 h 50 after BA 54 arrives on the timetable: more than half a day, so not a connection we count.