Set Date/Time in Linux

Here are the steps to set date and time in linux

Steps1) Set the time zone

# <strong>rm /etc/localtime </strong>
ln -s /usr/share/zoneinfo/GMT /etc/localtime

Step2) Set the time and date

Below are the commands that are required. For the date command this will set the time and date to 28th March 2012 18:08. The syntax is `date MMDDhhmmYYYY`.

# <strong>date 032818082012</strong>

Step3) Sync the hwclock with the current time and date

hwclock --systohc

Confirm Settings

To confirm your machine is set with the right time and date run the following commands :

# date
# hwclock

Resource: How to set the Time / Date and Timezone in CentOS

You may also like