 <unk> Phineas Flynn and Ferb Fletcher attend a museum , where they discover a broken time machine built in the 1880s on display . <unk> to travel through time themselves , they begin fixing it to work properly . This catches the attention of their sister , Candace , who desires to inform their mother of their activities to get in trouble . When she finally gets their mother Linda to follow her and view the machine , Linda becomes distracted while Candace continues to walk to the boys , just as their time machine activates . The three are sent back to the Late Cretaceous Period ( erroneously stated to be in 300 million B.C. ) , where a Tyrannosaurus rex immediately destroys the time machine . Now stranded , the three are forced to flee from the T. rex and are eventually saved by a herd of Alamosaurus lounging in a large pond . 
