The timezone_name_from_abbr() returns the timezone name from abbreviation.
PHP timezone_name_from_abbr() Function has the following syntax.
timezone_name_from_abbr(abbr,gmtoffset,isdst);
Parameter | Is Required | Description |
---|---|---|
abbr | Required. | timezone abbreviation |
gmtoffset | Optional. | Offset from GMT in seconds. Defaults to -1 which means that first found time zone corresponding to abbr is returned. Otherwise exact offset is searched and only if not found then the first time zone with any offset is returned. |
isdst | Optional. | Specifies daylight saving time indicator. |
isdst values to use
PHP timezone_name_from_abbr() Function returns the timezone name on success. FALSE on failure.
Return the timezone name from abbreviation:
<?php
echo timezone_name_from_abbr("EST") . "\n";
echo timezone_name_from_abbr("",7200,0);
?>
The code above generates the following result.