How to Change Your Default Timezone

There have been some updates to our servers and the way cPanel works to make it much easier to adjust the timezone than before. You can adjust the timezone in cPanel > Select PHP Version and then Switch to PHP Options to the top right. Here you would change the value of the date.timezone field to any of the following - As an example just type: Europe/London into that field and make sure to save changes.

Alternatively, you can update your .htaccess file. The instructions of which are below:

The .htaccess file is a hidden text file within your hosting account that can be very powerful. It is designed so that you can modify it to change the behaviour of your website that normally would take higher access beyond your account. It acts as a liaison between your domain and the server and can perform many functions.

The server has a specific time setting. This is usually based on the servers physical location, for example, if the datacentre that houses the server is located in California, the server will most likely be set to the Pacific Time. Some sites may cater to specific areas of the world and wish to use the timezone for that area. PHP has configuration files that can do this, but what about other tiles such as HTML or Log files? That is where the htaccess comes into play. Below are instructions for changing the base timezone in your local htaccess file.

Log into your cPanel.

Find the Files category and click on the File Manager icon.


Click Settings at the top right corner.


Select the Document Root for your domain and be sure the checkbox next to Show Hidden Files is checked. Click the Save button.


Look for the .htaccess file and right click on it. This brings up a menu. Find and click on the Edit option.


Now that you are in the htaccess editor, paste the following code at the top of the page to configure your account. In this example, we are setting the timezone to Eastern Standard Time.

#Adjust default time zone 
SetEnv TZ America/Washington

Be sure to hit the Save Changes button in the upper right corner to save your new htaccess configuration.

For more timezones
go to our "Timezone Reference List".

Congratulations, now you know how to change your default timezone in the .htaccess file!

  • 30 Users Found This Useful
Was this answer helpful?

Related Articles

How to add A Record in cPanel using DNS Zone Editor?

A Record is a DNS record and is used to point a domain or subdomain to an IP address. You can add...

Timezone Reference List

As you build your website, you may need or want to change the default time zone for your account...

How to update your cPanel Contact Information or receive a notification on reaching quota limit?

If you want to receive notification on reaching your disk quota, bandwidth usage limit, reaching...

How to Change Language of your cPanel?

cPanel supports a lot of languages, and if you want to change your cPanel language to your native...

How to View Website Statistics in cPanel Using AWStats

This tutorial will teach you how to check on who is viewing your website using the program in...