PHP timezone_name_from_abbr() function
Example
Returns the timezone name based on the timezone abbreviation:
<?php echo timezone_name_from_abbr("EST") . ل<br>; echo timezone_name_from_abbr("",7200,0); ?>
Definition and usage
timezone_name_from_abbr() returns the timezone name based on the timezone abbreviation.
Syntax
timezone_name_from_abbr(abbr,gmtoffset,isdst);
Parameter | Description |
---|---|
abbr | Required. Specify the timezone abbreviation. |
gmtoffset |
Optional. Specify the offset in seconds relative to GMT. Default is -1, indicating that the first matching timezone abbreviation found is returned. Otherwise, search for an exact offset. If not found, it returns the first timezone with any offset. |
isdst |
Optional. Specify the daylight saving time indicator.
|
Technical details
Return value: | If successful, it returns the timezone name, and if it fails, it returns FALSE. |
---|---|
PHP version: | 5.1.3+ |