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
The timezone_name_from_abbr() function returns the timezone name based on the timezone abbreviation.
Syntax
timezone_name_from_abbr(abbr,gmtoffset,isdst);
Parameters | Description |
---|---|
abbr | Required. Specifies the timezone abbreviation. |
gmtoffset |
Optional. Specifies 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, returns the first timezone with any offset. |
isdst |
Optional. Specifies the daylight saving time indicator.
|
Technical Details
Return Value: | Returns the timezone name if successful, FALSE otherwise. |
---|---|
PHP Version: | 5.1.3+ |