Update timezone in .htacccess file using File Manager (cPanel hosting account)

  • Logon to your cPanel acccount >> File Manager
  •  if you not able to see .htaccess file, please click on Settings in File Manager and Select ‘Show Hidden Files’. Save it.
  • Select .htacccess file and click on Edit button
  • Type below lines and click on save button to save changes:

                  #Set default time zone for hosting account

         SetEnv TZ America/NewYork

  • 4: All is done.

How to change timezone in .htaccess through ssh / command shell

  • If you have access to SSH, please logon to your server with cPanel account
  • Edit .htacccess with your favorite shell editor , like nano or vi and save changes
nano /home/yourcpaccount/public_html/.htaccess
Was this answer helpful? 9 Users Found This Useful (9 Votes)