There was a problem loading the comments.

How to change PHP time zone on cPanel or Linux servers

Support Portal  »  Knowledgebase  »  Viewing Article

This post explains how to change PHP time zone on cPanel or Linux servers.

First you need to open the the php.ini file. You can find the loaded configuration file by running following command.

php --ini

Once you found the file, please open it using vi, vim or nano editor.

vim /usr/local/lib/php.ini

and add the following code to your php.ini file.

date.timezone = "Asia/Kuala_Lumpur"

You can change “Asia/Kolkata” with the desired time zone. The list of supported timezones can be found Here

Restart Apache

service httpd restart

You can verify the configuration change by placing a phpinfo.php page on your website.

Share via

Related Articles

Copyright © 2023 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)