Setting the Date and Time in Linux
Updated September 21, 2001
Created September 27, 2000
Setting the Date and Time in LinuxNote: Just using the date command alone will not cause the date to remain after a reboot. The date command sets the Linux system clock which is separate from the hardware clock. The "hwclock --utc --systohc" command is used to update the hardware clock with the date from the Linux system clock.
Run the date command to make sure you have the correct time:
If you have the wrong timezone set, use "timeconfig" or "linuxconf" to set the correct timezone.
If your timezone is correct but the date and/or time needs updating, the following commands will update the date and time. The second command is needed in order to push the date and time into the PC clock.