BA 172 then BA 478 at Heathrow
New York JFK → London → Barcelona
Timetable, London time
08:35BA 172 from New York JFK at the gate
08:20BA 478 to Barcelona leaves the gate
23 h 45 apart on the timetable, overnight
BA 478 leaves 23 h 45 after BA 172 arrives on the timetable: more than half a day, so not a connection we count.