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?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 757-416-6627 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.
}