Symptoms
The date.timezone
is shown as no value
in domain phpinfo page (Plesk > Domains > example.com > PHP Settings > View the phpinfo() page):
Cause
The date.timezone
is not set in domain php.ini
 file.
Resolution
-
Check what PHP handler is set in Domains > example.com > PHP Settings.
Note: in this example, the PHP-FPM 7.1.32 is set for
example.com
domain. -
Go to Tools & Settings > PHP Settings > 7.1.32 FPM application > php.ini.
-
Find the line below:
;date.timezone
-
Uncomment the line and set the required timezone:
date.timezone = Asia/Singapore
Note:Â the additional timezones can be found here.
-
Go to Tools & Settings > Services Management and restart the PHP-FPM 7.1.32 service by pressing the highlighted button as shown below:
Â
Solution using the SSH access
- Log into the server via SSH.
- Check what PHP handler is used by domain example.com:
# plesk db “select d.name,h.php_handler_id from domains d join hosting h on h.dom_id=d.id where d.name=’example.com‘”;
+———–+—————–+
| name    | php_handler_id |
+———–+—————–+
| example.com | plesk-php71-fpm |
+———–+—————–+Note: in the this example, the PHP handler for
example.com
 domain is plesk-php71-fpm. -
Using the vi text editor, open the
/opt/plesk/php/7.1/etc/php.ini
file. -
Find and change the line below from:
;date.timezone =
To
date.timezone = Asia/Singapore
Note:Â the additional timezones can be found here.
-
Restart the appropriate PHP service:
# service plesk-php71-fpm restart