Configuring time and date on your Linux server using NTP

Use NTP to configure time and dates for you

yum install ntp

Start

service ntpd start

Start on reboot

chkconfig ntpd on

Get it to update now

/usr/sbin/ntpdate pool.ntp.org

Check your timezone

date will tell you EST, GMT etc

`Wed Feb 10 07:18:42 EST 2016`

To change:

  • See where ls /etc/localtime is linked to
  • Make sure your timezone is listed in ls /usr/share/zoneinfo/

    etc/localtime -> ../usr/share/zoneinfo/America/New_York
  • Change if wrong

    rm /etc/localtime
    ln –s /usr/share/zoneinfo/GB /etc/localtime