PHP.ini time zone correct but 1 hour out

JoshMc asked:

Inside my php.ini config, I’ve set date.timezone = "Europe/London". The current time is 00:31 whereas access logs/error logs etc. are showing 23:31. I’ve looked through the PHP documentation and apparently you can’t use BST/GMT etc. in the php.ini file. Any ideas?

My answer:

The php.ini setting only affects the time zone of your running PHP scripts. It is separate from the server timezone, which is probably set to UTC (according to best practices).

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.