Here’s a short and easy way to set your system and hardware clock from the command line.
Open your terminal and follow these steps.
First check the current time of your hardwareclock:
Then add the right date/time to your systemclock.
In the example provided you’ll find some strange long number.
You have to read it like this (from left to right):
 = month (Jan) |  = day |  = time (02:31) |  = year
sudo date 011402312011
Now sync your hardware clock with the date/time you’ve just set:
sudo hwclock --systohc
Check if the hardware clock is synced right:
sudo hwclock -r
One thought on “Changing date and/or time on Linux”