FR 7070 then W4 7991 at Madrid
Gdansk → Madrid → Pisa
Timetable, Madrid time
19:55FR 7070 from Gdansk at the gate
14:10W4 7991 to Pisa leaves the gate
18 h 15 apart on the timetable, overnight
W4 7991 leaves 18 h 15 after FR 7070 arrives on the timetable: more than half a day, so not a connection we count.