how to set date in linux

Shell
#sudo date --set="YYYYMMDD HH:MM:SS"
sudo date --set="20200515 12:30:00"
#set the date to 15 May 2020, 12hrs 30min and 0sec
Source

Also in Shell: