UA 370 then UA 5959 at Phoenix
Newark → Phoenix → Lagos
Timetable, Phoenix time
15:31UA 370 from Newark at the gate
14:28UA 5959 to Lagos leaves the gate
22 h 57 apart on the timetable, overnight
UA 5959 leaves 22 h 57 after UA 370 arrives on the timetable: more than half a day, so not a connection we count.