PHP timezone_name_from_abbr() Function
Example
Returns the time zone name based on the time zone 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 time zone name based on the time zone abbreviation.
Syntax
timezone_name_from_abbr(abbr,gmtoffset,isdst);
Parameters | Description |
---|---|
abbr | Required. Specifies the time zone abbreviation. |
gmtoffset |
Optional. Specifies the offset in seconds relative to GMT. Default is -1, indicating that the first matching abbreviation found is returned. Otherwise, search for an exact offset. If not found, returns the first time zone with any offset. |
isdst |
Optional. Specifies the daylight saving time indicator.
|
Technical Details
Return Value: | Returns the time zone name if successful, returns FALSE if failed. |
---|---|
PHP Version: | 5.1.3+ |