GateConnections

AA 986 then UA 5904 at O'Hare

San Francisco → Chicago → Madison

Timetable, Chicago time

20:30AA 986 from San Francisco at the gate

15:50UA 5904 to Madison leaves the gate

19 h 20 apart on the timetable, overnight

UA 5904 leaves 19 h 20 after AA 986 arrives on the timetable: more than half a day, so not a connection we count.