PU 302 then UX 9164 at Madrid
Lima → Madrid → Gran Canaria
Timetable, Madrid time
15:20PU 302 from Lima at the gate
15:05UX 9164 to Gran Canaria leaves the gate
23 h 45 apart on the timetable, overnight
UX 9164 leaves 23 h 45 after PU 302 arrives on the timetable: more than half a day, so not a connection we count.