The server that houses your hosting account is set to a specific time zone. This is either the Eastern Standard Time (EST) or Pacific Standard Time (PST) depending on whether your server is on the East Coast or West Coast of the US. Your site, however, may cater to a target market with a different time zone. In this case, you may want any times that display on your website to use that local time zone. Below are the instructions for using your .htaccess file to alter the default time zone for your site.

How to change your default timezone with the .htaccess file

  1. Log into your cPanel dashboard.
  2. Using the File Manager found in the Files category, be sure to show the hidden files and enter using root directory for the domain you are working with.
  3. Once in the proper folder, find the .htaccess file. You may have to create one if it does not yet exist. After finding or creating the file, you will need to open the file for editing.
  4. Now that you are in the editor, you will need to add the code for your desired time zone. In our example, we are setting the time zone to the New York time zone in the US.
    #Alter the default time zone for the site
    SetEnv TZ America/New_York

    If you are unsure of the name or format of your desired time zone, you can check out our time zone list article.
Did you find this article helpful?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.