JU 8510 then UA 1145 at San Francisco
New York JFK → San Francisco → Cancún
Timetable, San Francisco time
23:54JU 8510 from New York JFK at the gate
23:00UA 1145 to Cancún leaves the gate
23 h 06 apart on the timetable, overnight
UA 1145 leaves 23 h 06 after JU 8510 arrives on the timetable: more than half a day, so not a connection we count.