PHP Timezone | What is PHP Date Timezone | How to PHP Set Timezone

PHP Timezone


The date_default_timezone_set() function is an inbuilt function in PHP which is used to set the default timezone used by all date/time functions in a script. This function returns False if the timezone is not valid, or True otherwise.

Parameters: This function accepts single parameter $timezone_identifier which is mandatory. This parameter set the timezone identifier, like UTC or Asia/Kolkata.

Return Value: This function returns False if the timezone_identifier is not valid, or True otherwise.