I saw this movie in the early 2000s where a teenager and an older man (probably his dad) travel back in time to the middle ages. Their time machine gets broken, it is rather big and looks more like a spaceship. Like a NASA space shuttle but smaller/shorter.
They meet a group of peasants who are rebelling against the local nobles, much like Robin Hood's merry men. A guy who seems in charge of the rebels ask them who they are and what they do. The "dad" says they are inventors and the time machine is used to keep food fresh for weeks, but it's broken. Talk about a big fridge! The rebel leader laughs, "Why keep food when you can eat it?". They help camouflage the time machine until it can be fixed.
Suddenly they are attacked by a "dragon" but the teenager calms them down by telling them that it's called a Triceratops and it doesn't eat meat. He makes friends with a young guy who was impressed with his knowledge of "dragons". Somehow there is also a real dinosaur they must fend off, not quite a T-Rex but a bigger raptor maybe. He also helps them out with a battle against the nobleman's soldiers by creating some sort of electroshock device(s). When the medieval friend asks him what's that electricity he's talking about he says "it's not magic, but a form of energy, like lightning" to which he is told "So it's magic then, you really are a magician!" and he and his friends are totally in awe.
I think in the end they fix the time machine after also helping the rebels battle the oppressing feudal lord. The entire movie was rather lighthearted. This is a live action 90s English movie, nothing too fancy about it.