UA 1277 then UA 5398 at LAX
Cancún → Los Angeles → Monterey
Timetable, Los Angeles time
20:02UA 1277 from Cancún at the gate
19:10UA 5398 to Monterey leaves the gate
23 h 08 apart on the timetable, overnight
UA 5398 leaves 23 h 08 after UA 1277 arrives on the timetable: more than half a day, so not a connection we count.