How to Change timezone in cPanel Hosting with Htaccess

If your application hosted on cPanel Hosting server showing incorrect date or timezone and you do not have WHM access of your server then there are two ways to change timezone in cPanel.

this error using your .htacess file within your cPanel account. We face various issues because of invalid timezone problem but the most common issue is to run a cronjob

Updating your timezone in cPanel from Php.ini

First of all you need to Access your cPanel hosting account and if your website is hosted with YouStable then you can access it thru

Use top search box of your cPanel to find “Select Php Version” under the software section

timezone in cpanel
YouStable Shared Hosting Dashboard

This will redirect you to the Php version selection page, Here you need to click on “Switch to PHP Options” in the right side of the page

timezone in cpanel

You will able to see that there is an option date. timezone which allows you to change the time zone of your website or any application you have installed on your server,

if you are not aware of your country timezone find here:

timezone in cpanel

After making your correct choice click on “APPLY” button save the changes.

Change timezone using .htaccess

Many Web Hosting providers don’t support php.ini modification in those cases there is another way to change your website or server date and time by modifying your .htaccess file.

As you already logged in to your cPanel, find your apache configuration file under File Manage >> Public_html

Note: You will need to change settings because by default dot files are hidden for some security reasons

timezone in cpanel

Now right click on the file and choose “EDIT” option to modify the configuration

timezone in cpanel

You may notice various config codes in this file all you have to do is scroll down to the bottom of the page and paste this code

# Adjust default time zone
SetEnv TZ America/Washington

Now to make changes “SAVE” the file and reload your page.

Like This Post
Rajesh is an entrepreneur from heart. He loves to tweak and explore the possibilities around himself. He is a self-expert in SEO, blogging, and web hosting. Besides being an expert, he is strict when it comes to self-learning. He often advises others to follow this art. "We must be ready to learn anytime!"

You May Also Like :

Best Offshore hosting provider in 2021- DMCA ignored hosting

Cyber Monday Web Hosting Deals 2021 | Up to 99% OFF {Greatest Sale Live}

5 Amazing Yet Cheap Cloud Hosting Providers In 2021

Expand Your Career Opportunities With Top Udemy Courses At Just $5

On "How to Change timezone in cPanel Hosting with Htaccess"


    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Thanks for submitting your comment!