PHP date_default_timezone_set() Function

PHP date_default_timezone_set Function


Definitiion :

 In PHP date_default_timezone_set() function is inbuilt function.he date_default_timezone_set() function is used ti sets the default timezone used by all date/time functions in the script.

Syntax:

   date_default_timezone_set(timezone)

Parameter:
Parameter Description
timezone Required. Specifies the timezone to use, like "UTC" or "Europe/Paris". List of valid timezones: http://www.php.net/manual/en/timezones.php

Given below example Set the default timezone: 

Output : Asia/Bangkok