What could cause system date on our Apache web server to suddenly change back 2 days?

Noticed this morning some reports that clearly ran this morning (August 7) were dated August 5 by a php cron job. We (hopefully) are aware of all code added to the Apache server. We know of no code added to the system that changes the system date, but have added php code that only reads the system date.

Have you seen this happen before?
Is there a way we can determine what changed the system date and how?
What can we do to prevent this from happening in the future?
Joel BuhrPresidentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Is the server time right and it's just the log time that is wrong?
Ray PaseurCommented:
Please post the PHP code, thanks.
Joel BuhrPresidentAuthor Commented:
Server Hardware time is correct. It seems that the System time is what changed. to TWO days behind.

We had a client post a file two days ago (08/05/2014) and then they posted a file this morning (08/07/2014). However the time/date stamp on the file shows 08/05/2014 10:14:38 am.

Logged into webmin to check the server. And sure enough the System time was two days behind.

It was in sync two days ago. But somehow got changed since then.

It is set to synch the time with the firewall as a time server. I checked the firewall and it's date and time are correct.

Is their a log that I can check to see where this date change could have happened?
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

So it is just from php pages that is reporting the time wrong?
If it was hours it would probably be your timezone but 2 days out is weird

I don't know of any log for date/time changes
Joel BuhrPresidentAuthor Commented:
no this is not on PHP pages. This was system time.
Confused - you said the server time was correct
Need to see the cron job code.
Joel BuhrPresidentAuthor Commented:
Two times when I go to webmin and look at "System Time"
1. Server Time
2. Hardware Time

Timezone is set correct.

Time server sync is set to go at minute "1" and minute "19" of all days and hours.
Joel BuhrPresidentAuthor Commented:
Server time is what was off. So when a client posted a file this morning to the ftp server. Once the file was uploaded it showed an upload time of 08/05/2014 10:14:38 am  versus  08/07/2014 10:14:38 am.

Easy to fix as I went into webmin and told the system to sync and it corrected the time.

I did try to change the timeserver from  to north-america.pool.ntp.org which webmin did not like.

After digging I made a change on the outgoing firewall rule for UDP/123. It was originally set to only allow outgoing requests from one subnet. I adjusted it to include the subnet of the server.

Then changed time server to "north-america.pool.ntp.org" and it took it.

This should solve the issue.

It should not be the PHP code as the PHP code makes no time requests. The PHP code is also not being used to serve a web page here. It is running the script we use for some automated processes.

The Cron job executes the PHP and simply runs once a minute.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joel BuhrPresidentAuthor Commented:
Changed Firewall settings, this allowed a change in the timeserver which should resolve future time issues.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.