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.