Time correct in server but php gives wrong time

  • Thread starter Deleted member 101733
  • Start date
  • Tags
    php
D

Deleted member 101733

Guest
:rolleyes:
This is really strange.

WHM>Sever Configuration> Server Time says:
Sat Feb 7 20:37:58 CST 2015

That is correct. But...

Code:
echo date("m-d-Y",$_SERVER['REQUEST_TIME']);
Gives: 02-08-2015

Why is PHP giving me February 8th ????

Thanx
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

Check to see if you use a different time zone in your /usr/local/lib/php.ini file:

Code:
grep date.timezone /usr/local/lib/php.ini
If so, you can modify it, save the file, and restart Apache to enact the change.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
I am happy to see my response was helpful. Thank you for updating us with the outcome.