How should I change the date.timezone value in PHP?

By | January 12, 2011

If you are facing an issue wherein PHP scripts does not show the correct time, the reason for this can be mostly said to be because your web hosting server is based in a different time zone. The issue can be simply sorted out by changing the date.timezone setting in PHP.

As per your location you can set the date.timezone value in PHP by adding the below to your php.in file :

ate.timezone = “Asia/Calcutta”

The example is stated assuming that you would like to set the timezone for your PHP script to Asia/Calcutta.

If you face any issues while executing the above, you can contact your web hosting service provider for further assistance on the same.