0

As the title suggest a server I am running is producing a timestamp created by the PHP time() function that is about 60-70 slow.

The server did not have this problem and it has come out of the blue.

I have checked the time produced with servers on the same host and on unixtime websites but the problem server is consistently giving the wrong time.

Obviously not a timezone issue being only 70 seconds. It could well be an exact minute off but I have no idea how that could be set anywhere?

This is a centos6 OS.

Imag1ne
  • 225
  • 1
  • 4
  • 9
  • Cannot repo: `php --run 'print date('c', time()) . "\n";'; date --iso-8601=seconds --utc` yields identical values for me. What does it produce for you? – Mark Wagner Feb 26 '20 at 19:34

1 Answers1

0

Install chrony (yum install chrony)

You can view the difference to NTP-servers chronyc sources

To synchronize time with NTP-servers: chronyc makestep

Enable/Start daemon to stay synced chkconfig chronyd on and /etc/init.d/chronyd start

Virsacer
  • 648
  • 4
  • 14