Set the PHP timezone
Set date.timezone so PHP dates match your local time, and what to do when the Selector value appears not to apply.
Set the timezone PHP uses for dates and times. Applies to shared, reseller and Premium hosting.
Wrong timezone shows as timestamps offset by a fixed number of hours — scheduled posts publishing at the wrong time, log entries that do not match, order times that confuse customers.
Set it
- In cPanel, open Select PHP Version.
- Select Options.
- Find
date.timezoneand set it to your timezone.
Use a full identifier from the
PHP timezone list —
Europe/London, Africa/Cairo, America/New_York.
Use a region identifier, not an abbreviation or offset. EST and +02:00 do
not handle daylight saving, so times drift by an hour for part of the year —
and that failure only appears months later, which makes it hard to connect to
this setting.
Check what is actually applied
Create phpinfo.php in your document root:
<?php phpinfo();Visit it and search for date.timezone. The Local Value column is what
applies.
<?php echo date_default_timezone_get(), ' — ', date('Y-m-d H:i:s');Delete both files afterwards — phpinfo() exposes a great deal about your server.
If the value does not apply
Work through these in order:
A per-domain MultiPHP override. Setting a version in MultiPHP overrides the account-level Selector for that domain, including its settings — see MultiPHP vs Select PHP Version.
The application sets its own. WordPress ignores date.timezone entirely and
uses its own setting under Settings → General. Many frameworks call
date_default_timezone_set() at startup, which overrides everything above.
You are on Bolt-Cache. The PHP Selector does not apply — set it in
.user.ini instead:
date.timezone = Europe/LondonSee Change your PHP version and settings.
A .user.ini or .htaccess is overriding it. Check your document root for
either setting the value.
The CLI is separate
Scripts run from cron or SSH read the CLI PHP configuration, not the web one. Set the CLI version and options separately in the Selector if a scheduled script reports a different timezone — the same trap as Magento reports the wrong memory limit.