Definition :
In php timezone_name_from_abbr() Function is inbuilt function.PHP timezone_name_from_abbr() function is used to return the timezone name from the given abbreviation. The abbreviation is passed to it as a parameter. It returns the name of the timezone as output on success and False on failure.
timezone_name_from_abbr(abbr, gmtoffset, isdst)
Parameter | Description |
---|---|
abbr | Required. Specifies the timezone abbreviation |
gmtoffset | Optional. Specifies the offset from GMT in seconds. Default is -1, which means that first found timezone corresponding to abbr is returned. Otherwise exact offset is searched. If not found, the first timezone with any offset is returned |
isdst | Optional. Specifies daylight saving time indicator.
|
Given below example return the timezone name from abbreviation:
Output :
America/Chicago
America/New_York
Europe/Paris
Asia/Kolkata
Europe/Paris