I have purchased a CentOS 6.8 dedicated server to migrate from shared hosting, and I'm having trouble with the time zones not displaying properly.
I have changed the php.ini
time zone to Europe/Dublin
– it didn't work
I have changed the httpd.conf
timezone to Europe/Dublin
– it didn't work
And I am trying to change the actual CentOS timezone and this is where it gets weird. I changed time zone to Europe/Dublin
from CST
(which was the default), and it seems to think that Europe/Dublin
is GMT+14
.
Please see the image link below. The second date should have said Sat Jan 7 07:48:11 GMT 2017.
Best Answer
The CST time zone is GMT -6, so if CST time is 15:47 then GMT time is 21:47.
If you are saying that at the time you took the screenshot the time was supposed to be 07:48 in the morning, then your server time is not correct, and you need to synchronise it.
Run this command to synchronise the time to correct one:
It is possible you don't have
ntp
installed at all on your server, in which case you need to install it with:And start the NTP service to keep the time synchronised with:
Also make sure to set the NTP service to autostart on boot with: