BA 659 then IB 722 at Heathrow
Larnaca → London → Madrid
Timetable, London time
18:50BA 659 from Larnaca at the gate
18:45IB 722 to Madrid leaves the gate
23 h 55 apart on the timetable, overnight
IB 722 leaves 23 h 55 after BA 659 arrives on the timetable: more than half a day, so not a connection we count.