How to change your default timezone using .htaccess in cPanel?

Last modified: August 1, 2020
You are here:
Estimated reading time: 1 min

In this tutorial we can check how to change your default timezone using .htaccess in cPanel

 

1) Log in to your cPanel.

2) Click ‘File Manager’ icon from the ‘FILES’ category.

Change timezone

 

3) Select ‘Settings’ at the right corner of the ‘File Manager’.

Change timezone

 

4) Select Document root of your domain and select ‘Show Hidden Files’ from the bottom of the screen.

Change timezone

 

5) Find ‘.htaccess’ and right click on it. It shows a menu. Click ‘Edit’ from the menu list.

Change timezone

 

6) Now you can add particular timezone setting to the .htaccess. Paste the following code at the top of the page to configure your account. In this example, we are going to set the timezone to Eastern Standard Time.

# Adjust default time zone

SetEnv TZ America/Washington

7) Click on ‘Save Changes’ button.

 

Change timezone settings via command line.

1) Log in to server via SSH

2) Find the public_html of the domain you want to set timezone.

3) Open .htaccess file with your favorite text editor.

 # vi .htaccess

4) Add the timezone setting on the bottom of the .htaccess page.

#Adjust default time zone

SetEnv TZ America/Washington

 

If you need any further assistance please contact our support department.

Was this article helpful?
Dislike 0
Views: 40