PHP | timezone_name_from_abbr() Function Last Updated : 16 Aug, 2018 Comments Improve Suggest changes Like Article Like Report The timezone_name_from_abbr() function is an inbuilt function in PHP which is used to return the timezone name from abbreviation. The abbreviation is sent as a parameter to the timezone_name_from_abbr() function and it returns the name of the timezone on success or False on failure. Syntax: string timezone_name_from_abbr( $abbr, $gmtoffset, $isdst ) Parameters: This function accepts three parameters as mentioned above and described below: $abbr: It is a mandatory parameter which specifies the timezone abbreviation. $gmtoffset: It is an optional parameter which specifies the offset from GMT in seconds. The default value is -1, which means that first found timezone corresponding to abbr is returned. $isdst: It is an optional parameter which specifies the daylight saving time indicator. The default value is -1, which means that whether the timezone has daylight saving or not is not taken into consideration when searching. Return Value: It returns the name of the timezone on success or False on failure. Exceptions: The timezone_name_from_abbr() function is an alias of DateTimeZone::listAbbreviations function. Below program illustrate the timezone_name_from_abbr() function in PHP: Program 1: php <?php // Displaying the name of timezone using the abbreviation $abbr = timezone_name_from_abbr("PST"); echo ("PST stands for " . $abbr); ?> Output: PST stands for America/Los_Angeles Program 2: php <?php // Displaying the name of timezone using the abbreviation $abbr = timezone_name_from_abbr("", 7200, 0); echo ("The given parameter stands for " . $abbr); ?> Output: The given parameter stands for Europe/Helsinki Related Articles: PHP | timezone_open() Function PHP | timezone_version_get() Function Reference: http://php.net/manual/en/function.timezone-name-from-abbr.php Comment More infoAdvertise with us Next Article PHP | timezone_name_from_abbr() Function S Shubrodeep Banerjee Follow Improve Article Tags : Misc Web Technologies PHP PHP-date-time PHP-function +1 More Practice Tags : Misc Similar Reads PHP | timezone_name_get() Function The timezone_name_get() function is an inbuilt function in PHP which is used to return the name of the timezone. The date time object is sent as a parameter to the timezone_name_get() function and it returns the name of the timezone on success or False on failure. Syntax: string timezone_name_get( $ 2 min read PHP | date_timezone_get() Function The date_timezone_get() function is an inbuilt function in PHP which is used to return time zone relative to given DateTime. This function returns a DateTimeZone object on success or False on failure. Syntax: Procedural style: date_timezone_get( $object ) Object oriented style: DateTime::getTimezone 1 min read PHP | timezone_abbreviations_list() Function The timezone_abbreviations_list() function is an inbuilt function in PHP which is used to return an associative array containing dst, offset, and the timezone name. No parameters are required to send to the timezone_abbreviations_list() function and it returns an associative array on success or Fals 3 min read PHP | timezone_open() Function The timezone_open() function is an inbuilt function in PHP which is used to create a new DateTimeZone object. The timezone_open() function accepts the timezone as a parameter and returns the DateTimeZone object on success or False on failure. Syntax: timezone_open( $timezone ) Parameters: This funct 2 min read PHP | date_default_timezone_get() Function The date_default_timezone_get() function is an inbuilt function in PHP which is used to gets the default timezone used by all date/time functions in a script. Syntax: string date_default_timezone_get( void ) Parameter: This function does not accept any parameter.Return Value: This function returns a 2 min read Like