Here in this article we will describe you “How to Change Default Time Zone Permanently in cPanel via .htaccess File”.
Live Video Tutorial- How to set default timezone via htaccess in cPanel?
Follow the steps to set the default timezone in cPanel:
Phase 1 login to your cPanel Dashboard
Phase 2 click on file manager section and visit public_html
step 3 Create a file named testing.php or test.php
step 4 Now right click on the file and select Edit
Step::5 enter the code below
<?php echo "Today is " . date("Y/m/d") . "<br>"; echo "The time is " . date("h:i:sa"); ?>
Step::6 now again public_html and edit .htaccess file. If you can’t find the .htaccess file inside your public_html, just create one
Step::7 Once you have the .htaccess file, place the code below
<IfModule php5_module> php_value date.timezone ="Asia/Kolkata" </IfModule>
Don’t forget to save the files.
Now try to open this test.php file in a new tab. You will find that your website is showing the correct time.
Thank you for reading this article… we hope it was helpful to all of you!!