Rather than rebooting to set the hardware clock in the BIOS, you can sync the hardware clock on your machine to the current time in Linux using the hwclock and date commands.
To set the hardware clock's date and time, use the hwclock command:
hwclock --set --date "01/01/70 01:01:01"
The date command allows you to get the current date, in the above format when using these arguments:
date +'%m/%d/%y %H:%M:%S'
Thus, you can combine the two commands to sync the hardware clock with the time in your OS. Note the backtick character below (inside the double quotations) which executes the date command and dumps the output into the double quotations:
hwclock --set --date "`date +'%m/%d/%y %H:%M:%S'`"





