The date_default_timezone_set() function sets the default timezone used by date/time functions.
PHP date_default_timezone_set() Function has the following syntax.
date_default_timezone_set(timezone);
PHP date_default_timezone_set() Function returns FALSE if the timezone is not valid. TRUE otherwise.
Set the default timezone:
<?php
date_default_timezone_set("Asia/Bangkok");
echo date_default_timezone_get();
?>
The code above generates the following result.