Set the Time for an Instance

Set the timezone

  1. open the timezone file: sudo vi /etc/sysconfig/clock and in “ZONE” row set your timezone (to view a list of timezones avalable lookup with a ll /usr/share/zoneinfo (and subdir)
  2. create a symlink to that file: sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime 
  3. reboot to be sure all services and applications are in sync

Set the ntp server

  1. by default amazon ec2 istances are fine with the ntp daemon but try this: sudo service ntpd status
  2. if is not running type: sudo service ntpd start (or restart)
    1. and be sure to run it at startup with: sudo chkconfig ntpd on
  3. check ntp is working and on wich servers with: ntpq -p