I have recently moved a site from a UK server to a US server. I was under the impression that the php date function returned a time local to the client, however when accessing the site from the UK the server is returning the current time in the US. As my site is schedule based, i.e. specific things are displayed at specific times in the UK this is causing problems. How can i solve this? Obviously i can add or remove from the timestamp to make the time correct in the UK but this will make the time incorrect for US users.
php 4.3.8 on freeBSD server.
here is my solution, for people on GMT anyways..
$dateNow = gmdate("d/m/Y", time() + 3600*(date("I")));
This also takes daylight savings into account.