SpongeBob SquarePants
Buried in Time / Enchanted Tiki Dreams
S7 E19:
SpongeBob, Patrick and Squidward are accidentally locked in Bikini Bottom's first time capsule. SpongeBob and Patrick build a dream world for Squidward.