AC 2331 then AC 1814 at Toronto Pearson
Ottawa → Toronto → Cancún
Timetable, Toronto time
19:32AC 2331 from Ottawa at the gate
19:10AC 1814 to Cancún leaves the gate
23 h 38 apart on the timetable, overnight
AC 1814 leaves 23 h 38 after AC 2331 arrives on the timetable: more than half a day, so not a connection we count.