mobil odeme ukash
biber hapi

Joomla Timezone Skip

Why is my website showing the wrong date and timezone?
While working on some web projects with Joomla, we have encountered a very frustrating incident, where modules and components, that rely on the timezone settings and dates, were off by half a day.

After hours of searching within Joomla and on the web, we realized that the problem was right under our nose!

In Joomla, within your Global Configuration panel, you can select your timezone setting in order to make sure that when you create new items and articles, they appear with the correct date. However sometimes it is not enough and Joomla does not explicitly warn you that there is another setting to check for.

In the Global Configuration panel, Joomla mentions that the timezone settings should be matched with the Server timezone and not your own local timezone. Lets say I am in China and my server is in Mid-western United States, there will be a timezone difference of 12 hours. But since I am catering to the Chinese market, I wish to have all of my dates and time based on the <strong>Asia/Shanghai</strong> timezone. Even if in the Global Configuration I have indicated "+8 GMT Beijing" the problem will not be solved. So how to solve this problem?

First you should always check were your server is located. A simple way to do this is to locate at the top of your Administrative Panel for the menu item Help & Server Info.

You will land on a series of tabs, and then locate for the PHP Information tab.

Then within all the PHP information, locate the Date settings with the Default Timezone value.

In our case, our server is located in America-Chicago. But what if we want to force the system to recognize a different timezone?

Whenever you wish to force a change on your website that will overwrite the server settings that can be found in your PHP Information, you can refer to the file named php.ini within the root directory of your Joomla installation. If you do not already have a php.ini in the root of your directory, you may create one with a simple editor such as Notepad for Windows and TextEdit for Mac.

First check if the line "date.timezone" exists. If so, change with the timezone you wish to have. Otherwise, add the following line:

date.timezone = "YourContinent/YourCity"
In our case, our it would be: date.timezone = "Asia/Shanghai"
Save your php.ini and if needed, upload it to the root of your Joomla installation. Double check that your Global Configuration have the right timezone and everything should work.
If you are not sure what timezone you should use here is a list of supported timezones for PHP.

You may change a lot of other server settings with your new php.ini such as changing the maximum file upload. If you are interested to do more, then you should first check this list of directives for the php.ini at

Let us know on our blog if you have any problems and have a good day!

Last modified on Wednesday, 10 August 2011 09:09
More in this category: « Joomla, the introduction
Login to post comments