In order to change the date, you need root access.
Ubuntu disables the root account by default, therefore to run any commands that need root access you typically use sudo.
The first account that is created on Ubuntu has full sudo rights.
To change the date to 07:00 on 1 Apr, you would need to issue the command:
This will ask for your password (so that it can check if you are able to run this sudo command)
To have this run as a bash script, you need to enter the command into a file. Make #!/bin/bash the first entry in your file
### Demonstration of bash script to change the date to April Fools Day
sudo date 04010700