centos - PHP date() function gives the wrong time -


 date('d-m-y h:i:s a') 

the above code displays correct date wrong time. isn't off hours either; minutes off. have set default time zone in php using function in php.ini, set date , time on server, , restarted it. ideas why still won't work? i'm running centos apache , php. latest versions.

[update] looks it's problem system clock. resets random time whenever manually update it. i've tried disabling ntpd still this, not sure why. i'm not sure if should close question or open new one.

[another update] set timezone in linux , went whm > server configuration > server time , set update date , time. said updated , displays correct date , time, refresh or check on server it's other date , time. can't tell @ point if reverting instantly or not being set @ without throwing errors.

after digging, found out vps hosts don't let change time on own vm, had take out support ticket , have them fix it. if else having similar issues i'd suggest asking host first.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -