BA 116 then BA 962 at Heathrow
New York JFK → London → Hamburg
Timetable, London time
08:10BA 116 from New York JFK at the gate
06:45BA 962 to Hamburg leaves the gate
22 h 35 apart on the timetable, overnight
BA 962 leaves 22 h 35 after BA 116 arrives on the timetable: more than half a day, so not a connection we count.