Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP timezone_name_from_abbr() Function

PHP timezone_name_from_abbr() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Return the time zone name from an abbreviation:

"; echo timezone_name_from_abbr("",7200,0); ?>

Run Example »


Definition and Usage

timezone_name_from_abbr() returns the time zone name from an abbreviation.

Syntax

timezone_name_from_abbr(

abbr,gmtoffset,isdst);

Parameters Description
abbr Required. Specifies the time zone abbreviation.
gmtoffset Optional. Specifies the offset from GMT in seconds. Defaults to -1, which means the first time zone found matching the abbreviation is returned. Otherwise, an exact offset is searched for. If none is found, the first time zone with any offset is returned.
isdst Optional. Specifies the daylight saving time indicator.
  • -1 = Default. Whether to consider the time zone's daylight saving time when searching
  • 1 = Indicates that gmtoffset is an offset affected by daylight saving time
  • 0 = Indicates that gmtoffset is an offset not affected by daylight saving time
  • |

    Technical Details

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

    PHP Date/Time PHP Date/Time Reference Manual