3

I need to create a cron job to run a script. Changed the server timezone to Eastern following the first option in this guide. The timezone was changed successfully but when I run date I'm noticing that the time is about 5 minutes ahead of time.gov (and my local machine).

Any idea what is causing this and how I can fix it?

9

You want to setup NTP.

See:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html

Extra content here.

2
  • I recently rebooted the server and now the issue seems to have been resolved. Not sure if it was the reboot but I didn't do anything else. Is it possible that the reboot did it? – sixty4bit Aug 9 '14 at 15:54
  • I used chrony as suggested following the link instructions. At first the chrony stats were showing that my instance was 6 minutes ahead, but as time went by chrony was syncing the time and 30 minutes later it was on sync, no need to restart the instance. – le0diaz Jan 30 '18 at 21:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.