PHP - Function timezone_name_from_abbr()


Advertisements


Syntax

timezone_name_from_abbr( $abbr [, $gmtOffset [, $is_dst]] );

Definition and Usage

This function returns the timezone name from abbrevation.

Parameters

Parameter Description
abbr Required. Time zone abbreviation.
gmtOffset Optional. Offset from GMT in seconds.
is_dst Optional. Daylight saving time indicator.

Return Value

Returns time zone name on success or FALSE on failure.

Example

Following is the usage of this function −

<?php
   echo timezone_name_from_abbr("CET") . "<br />";
   echo timezone_name_from_abbr("", 3600, 0) . "\n";
?>

This will produce the following result −

Europe/Berlin
Europe/Paris

php_function_reference.htm