BA 423 then BA 159 at Heathrow
Málaga → London → Hamilton
Timetable, London time
15:00BA 423 from Málaga at the gate
14:40BA 159 to Hamilton leaves the gate
23 h 40 apart on the timetable, overnight
BA 159 leaves 23 h 40 after BA 423 arrives on the timetable: more than half a day, so not a connection we count.