Server is the wrong time

php

Solution

You can change the timezone using PHP

putenv("TZ=Europe/London");

or if that produces an error:

date_default_timezone_set('Europe/London');

Alternatively if you can gain access to your php.ini (maybe not due to your hosting)

date.timezone = "Europe/London"

Change the setting to the above and you should be ok. Additional to the above - you can set the php.ini with PHP

ini_set('date.timezone', 'Europe/London');

http://www.php.net/manual/en/timezones.europe.php

Edit:

In my rush to answer - you could write GMT instead of Europe/London

Problem

So I am from the UK and have hosting in the US. I contacted my host and said that my server time is set 6 hours behind GMT. They said I need to alter this in my CMS. How would i go about doing this? Whenever i put now() i am getting the wrong time. Never seen this before, could anyone offer any suggestions?

Original source