Note that the following commands have not been tested, but based off of other ones so should work.
Open a terminal and run the following two commands to delete level.dat and level.dat_old
Should be able to open up Minecraft and have the timer reset. Note that all the achievments in the game will be reset as well.
Open Windows File Explorer, in the Address Bar paste the following and hit enter.
You should now be in the demo world folder.
Delete the “level.dat” and “level.dat_old” files and restart minecraft. Your timer should now be reset as well as all the game objectives.
Open up Finder and hit the Shift, Command, and “G” key simultaneously and then type in ~/Library/Application Support/minecraft/saves/Demo_World and hit return.
This should put you in your Demo World minecraft directory.
Now delete the “level.dat” and “level.dat_old” files and restart minecraft. Your time should now be reset… As well as your Objectives.