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.
grammar
timezone_name_from_abbr(descriptiongmtoffsetisdst,
); | parameter |
---|---|
description | required. Define the timezone abbreviation. |
gmtoffset |
optional. Define the offset in seconds relative to GMT. default is -1, which means returning the first matching timezone abbreviation found. Otherwise, search for an exact offset. 找不到时,则返回第一个匹配的偏移量的时区。 |
isdst |
optional. Define daylight saving time indicator.
|
기술 세부 사항
반환 값: | 성공하면 시간대 이름을 반환하고, 실패하면 FALSE를 반환합니다. |
---|---|
PHP 버전: | 5.1.3+ |