How to set the default timezone in PHP?

Posted by Editorial Staff | Updated on |

Answer: Use date_default_timezone_set() to set the default timezone

In this example, we will share how to set the default timezone used by all date/time functions in your PHP based project.

Example #1 Getting the default timezone

List of Supported Timezones in PHP


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers