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

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

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.

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

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

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 Lebanon/Beirut

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 Lebanon/Beirut

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

Leave a Comment

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

You May Also Like