UA 368 then UA 5940 at O'Hare
San Francisco → Chicago → Tucson
Timetable, Chicago time
05:47UA 368 from San Francisco at the gate
19:54UA 5940 to Tucson leaves the gate
14 h 07 apart on the timetable
UA 5940 leaves 14 h 07 after UA 368 arrives on the timetable: more than half a day, so not a connection we count.