W6 2377 then FR 4585 at Barcelona
Budapest → Barcelona → Porto
Timetable, Barcelona time
20:05W6 2377 from Budapest at the gate
19:20FR 4585 to Porto leaves the gate
23 h 15 apart on the timetable, overnight
FR 4585 leaves 23 h 15 after W6 2377 arrives on the timetable: more than half a day, so not a connection we count.