# date -s "hh:mm:ss"
Change the date
# date -s "yyyy-mm-dd"
Change the date and the time
# date -s "yyyy-mm-dd hh:mm:ss"
For more details about the command date use
date --help
However, remember to also update your hardware clock in the case you turn off your computer and you want to keep the current date of the system. To do so, use the following commands.
Copy the time from the hardware clock to the system
# hwclock --hctosys
Copy the time from the system to the hardware clock
# hwclock --systohc
No comments:
Post a Comment