FR 5483 then FR 7071 at Madrid
Porto → Madrid → Gdansk
Timetable, Madrid time
01:15FR 5483 from Porto at the gate
21:35FR 7071 to Gdansk leaves the gate
20 h 20 apart on the timetable
FR 7071 leaves 20 h 20 after FR 5483 arrives on the timetable: more than half a day, so not a connection we count.