Linux server: Set date and time

Set your correct timezone:

# timeconfig

* You may need to install timeconfig 'yum install tzdata'

select your timezone.. select "system clock uses UTC"

or you can set it manually

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime


Set the correct system clock

# ntpdate

to set the system time manually to 2:30pm:

date -s "14:30:00"

It's recommended to keep your hardware clock set to UTC/GMT. This maintains clocks without having to worry about daylight savings time.

To set hardware clock from system clock and to UTC/GMT

# hwclock --systohc --utc
# hwclock --show

You may also want to check this post:

Tags: Linux admin time date