Knowledgebase
How to Set the PHP Timezone in cPanel
Posted by LankaHost NOC on 15 February 2017 11:47 AM

On all our servers, default time zone is Sri Lanka ( GMT + 5.30), However depend on the customizations you will see some diffrent time zones in your account. You can change the PHP time zone in your account by doing following changes.

Step 1 :

Log-in to the cPanel and navigate to file manager, Public_html folder

 

Step 2:

If there is php.ini file, open it using a text editor in file manager.

    ** If there is no any php.ini file, you can create a new file and name it as php.ini

 

Step 3:

Add following line on top the php.ini file

date.timezone = "Asia/Colombo"

 

Step 4:

If you need to use some other time zone, you can replace it with valid time zone from here.

 

Once you save the file, it will reflect in your web site.

(2 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).