How to set PHP timezone in cPanel

You can configure the cPanel PHP setting to use your local time zone by setting the date.timezone directive in .user.ini or using our MultiPHP INI editor.

How to change 'date.timezone' on cPanel Hosting:

Method 1:

Login to your cPanel >> File Manager

Navigate to the public_html folder of your website or for addon domains. Next, click on the Setting tab to display hidden and dot files as below:

Screenshot 2021-06-29 at 4.11.33 PM.png

If you don't have the .user.ini file yet, feel free to create it using the "+ File"button

Add the following line and save: date.timezone = "Asia/Kolkata"

change to the preferred time zone, you can find PHP supported list of timezone Here!

Method 2:

Navigate to cPanel > MultiPHP INI Editor > Editor Mode. Selet your domain and add the below line then click save.

date.timezone = "Asia/Kolkata"

Screenshot 2021-06-29 at 4.19.45 PM.png

That's all.