Some time we may required to change change the system date and time. In general we will try to change date with date command.
$ date --set="6 JAN 2012 02:14:00"
By default the updated date setting won’t be get modified in hardware clock, so when you reboot the machine again the date and time values are get synced with hardware clock. You need to manually update the hardware clock with hwclock command.
To view date/time in hardware clock use following command:
$ hwclock --show
To update hardware clock use following command:
$ hwclock --systohc