I have hosted application on apache server, I checked the server time which is showing [Fri Aug 30 10:07:57 UTC 2019] while I checked the time on google [10:05 am Friday, 30 August 2019] that mean there is 2 minutes difference between the actual time and server time, this difference causes a problem for me while running the applications I am hosting in this server.

  • 2
    Do you own the server? Do you have root access to it? Can you set your VM to use an NTP server and point it to a known accurate server for your requirements? If you don't have access to it then you'll need to talk to your server admin. – Kinnectus Aug 30 at 10:49
  • 2
    This is an OS issue. Apache relies on the OS to keep proper time. You didn't mention what OS you have Apache running on, if you had we could supply you with the necessary commands or provide you with the links to read up on it. But as mentioned before you need to get the OS to sync up with a time(NTP) server for accurate time keeping. Here's a good place to start; ntppool.org/en/use.html – Larryc Aug 30 at 12:00
  • @Larryc The apache is running on Linux OS, So if you could help me with the proper commands for setting the time? – Hashem Aug 30 at 12:25
  • Go to that link I provided. above. The first thing he does is show you how to set it up and verify it is working in linux. – Larryc Aug 31 at 8:14
  • If setting up an NTP pool is to hard, just set up a cronjob to do "ntpdate NTP.SERVER" every day. It won't be quite as accurate, but should be close enough for most purposes" – davidgo Aug 31 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.