CA 839 then VY 1010 at Barcelona
Shanghai → Barcelona → Madrid
Timetable, Barcelona time
07:25CA 839 from Shanghai at the gate
07:20VY 1010 to Madrid leaves the gate
23 h 55 apart on the timetable, overnight
VY 1010 leaves 23 h 55 after CA 839 arrives on the timetable: more than half a day, so not a connection we count.