SpongeBob SquarePants: Season 7, Episode 34
SpongeBob, Patrick, and Squidward get locked inside a time capsule.