The only episodes that involve actual time travel are "Time and Punishment" from "Treehouse of Horror V" and "Bart & Homer's Excellent Adventure" from "Treehouse of Horror XXIII".