BA 2717 then UX 1016 at Gatwick
Funchal → London → Madrid
Timetable, London time
19:55BA 2717 from Funchal at the gate
17:25UX 1016 to Madrid leaves the gate
21 h 30 apart on the timetable, overnight
UX 1016 leaves 21 h 30 after BA 2717 arrives on the timetable: more than half a day, so not a connection we count.