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