PHP timezone_name_from_abbr()Functions

PHP Date/TimePHP Date/Time Reference Manual

Examples

Return the timezone name based on a timezone abbreviation:

<?php
echo timezone_name_from_abbr("EST") . "<br>";
echo timezone_name_from_abbr("",7200,0);
?>

Run example »

Definition and Usage

timezone_name_from_abbr() returns the timezone name based on a timezone abbreviation.

Syntax

timezone_name_from_abbr(abbr,gmtoffset,isdst);

Parameters Description
abbr Required. Specifies the timezone abbreviation.
gmtoffset Optional. Specifies the offset from GMT in seconds. Default is -1, meaning the first matching abbreviation found is returned. Otherwise, an exact offset is searched. If not found, the first timezone with any offset is returned.
isdst Optional. Specifies the daylight saving time indicator.
  • -1 = Default. Whether to consider the timezone's daylight saving time during the search
  • 1 = Indicatesgmtoffsetis an offset that is affected by daylight saving time
  • 0 = Indicatesgmtoffsetis an offset that is not affected by daylight saving time

Technical Details

Return Value: Returns the timezone name on success, or FALSE on failure.
PHP Version: 5.1.3+


PHP Date/TimePHP Date/Time Reference Manual Other Extensions