Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Time correct in server but php gives wrong time

Discussion in 'General Discussion' started by cpN00bie, Feb 7, 2015.

  1. cpN00bie

    cpN00bie Member

    Joined:
    Dec 31, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    :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
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cpN00bie

    cpN00bie Member

    Joined:
    Dec 31, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Thanx m8, that was the problem :)
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I am happy to see my response was helpful. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice