How to Set Default Timezone via htaccess in cPanel?

Here in This Article We Will Describe You How to Change Default Time Zone Permanently in cPanel via .htaccess file.

1. Login to Your cPanel.

2. Click on File Manager Section and go to public_html.

3. Create a file in the name of testing.php or test.php.

4. Now right click over the file and choose Edit.

5. Place the codes given below

<?php
echo "Today is " . date("Y/m/d") . "<br>";
echo "The time is " . date("h:i:sa");
?>

6. Now again go back to public_html and Edit .htaccess file. If you are unable to find .htaccess file inside your public_html, simply create one

7. Once you have the .htaccess file, place the code given below

<IfModule php5_module>
php_value date.timezone ="Asia/Kolkata"
</IfModule>

Don’t forget to save the files.

Now try to open this testing.php file in a new tab. You will find that your website is showing the correct time.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to Remove Subdomain from cPanel

Follow the steps to remove Subdomain from your cPanel: Step::1 Login to your cPanel Step::2 Go...

How to Remove an Addon Domain from cPanel

Follow the steps to remove Addon Domains from your cPanel: Step::1 Login to your cPanel Step::2...

How Do I Update My Site PHP Version?

Follow The Step to Update Your PHP Version From cPanel: 1. Login to your cPanel. 2. Select...

A Beginners Guide to cPanel

What is cPanel? In simple Terms, it’s a Control Panel Where You Can Manage Every Element of Your...

How to Create a Subdomain from cPanel

Follow the steps to Create Subdomain from your cPanel: 1. Login To Your cPanel. 2. You have to...