EC 1017 then EC 1294 at Madrid
Basel → Madrid → Geneva
Timetable, Madrid time
20:20EC 1017 from Basel at the gate
20:10EC 1294 to Geneva leaves the gate
23 h 50 apart on the timetable, overnight
EC 1294 leaves 23 h 50 after EC 1017 arrives on the timetable: more than half a day, so not a connection we count.