Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

robgoodliffe's avatar

Timezone to Europe/London

I'm on a new forge server and i'm struggling to get php to show the correct date time etc. It's displaying as an hour behind UK BST when I run date('m/d/Y h:i:s a', time()) and date_default_timezone_get() comes back as UTC

phpinfo() gives the following date information date/time support - enabled "Olson" Timezone Database Version - 0.system Timezone Database - internal Default timezone - UTC

date.default_latitude - 31.7667 31.7667 date.default_longitude - 35.2333 35.2333 date.sunrise_zenith - 90.583333 90.583333 date.sunset_zenith - 90.583333 90.583333 date.timezone - Europe/London Europe/London

The Default timezone seems to still be UTC but the date.timezone seems to be correctly set as Europe/London

Things i've tried:

I've edited the etc/php/7.0/fpm/php.ini file and restarted nginx date.timezone = Europe/London

I also tried to edit the server time with sudo dpkg-reconfigure tzdata and set it to Europe/London but after that didn't work I set it back to UTC.

Any advice would be appreciated. Thanks, Rob

0 likes
1 reply
jekinney's avatar

The date and times are calculated by the servers OS clock. Make sure the servers time is correct. Many times on install it's not correct.

1 like

Please or to participate in this conversation.