It's a simple question..but drive me 2 madness. the result of this simple line of code:
echo gmdate('Y/m/d H:i:s');
... must output GMT time but it get it minus 1 hour!!!!! So why??
It's a simple question..but drive me 2 madness. the result of this simple line of code:
echo gmdate('Y/m/d H:i:s');
... must output GMT time but it get it minus 1 hour!!!!! So why??
Greenwich Mean Time has no "Summer Time" or "Daylight Saving Time" so depending on the season of the year these statements may produce the same or different output.
date_default_timezone_set('Europe/London');
echo gmdate('c');
echo date('c');
-- from the PHP manual (so, in addtion to the answer you get a clear RTM ;)
More information about timezones and daylight saving on SO.
Compare the output of your script with:
If it's wrong, the computer where you run the code is probably misconfigured.