UA 2238 then UA 5398 at LAX
Newark → Los Angeles → Monterey
Timetable, Los Angeles time
19:16UA 2238 from Newark at the gate
19:10UA 5398 to Monterey leaves the gate
23 h 54 apart on the timetable, overnight
UA 5398 leaves 23 h 54 after UA 2238 arrives on the timetable: more than half a day, so not a connection we count.