timezone_name_from_abbr Returns the timezone name from abbreviation
发表日期:2021-07-01 08:55:28 | 来源: | | 浏览(514) 分类:Date/Time 函数
timezone_name_from_abbr
(PHP 5 >= 5.1.3, PHP 7, PHP 8)
timezone_name_from_abbr — Returns the timezone name from abbreviation
说明
$abbr
, int $utcOffset
= -1, int $isDST
= -1): string|false参数
-
abbr
-
Time zone abbreviation.
-
utcOffset
-
Offset from GMT in seconds. Defaults to -1 which means that first found time zone corresponding to
abbr
is returned. Otherwise exact offset is searched and only if not found then the first time zone with any offset is returned. -
isDST
-
Daylight saving time indicator. Defaults to -1, which means that whether the time zone has daylight saving or not is not taken into consideration when searching. If this is set to 1, then the
utcOffset
is assumed to be an offset with daylight saving in effect; if 0, thenutcOffset
is assumed to be an offset without daylight saving in effect. Ifabbr
doesn't exist then the time zone is searched solely by theutcOffset
andisDST
.
返回值
Returns time zone name on success 或者在失败时返回 false
.
范例
示例 #1 A timezone_name_from_abbr() example
1 | <?php |
2 | echo timezone_name_from_abbr( "CET" ) . "\n" ; |
3 | echo timezone_name_from_abbr( "" , 3600, 0) . "\n" ; |
4 | ?> |
以上例程的输出类似于:
Europe/Berlin Europe/Paris
- PHP(0)
- PHP杂项(34)
- PHP基础-李炎恢系列课程(20)
- 中文函数手册(0)
- 错误处理 函数(13)
- OPcache 函数(6)
- PHP 选项/信息 函数(54)
- Zip 函数(10)
- Hash 函数(15)
- OpenSSL 函数(63)
- Date/Time 函数(51)
- checkdate 验证一个格里高里日期(0)
- date_add 别名 DateTime::add()(0)
- date_create_from_format 别名 DateTime::createFromFormat()(0)
- date_create_immutable_from_format 别名 DateTimeImmutable::createFromFormat()(0)
- date_create_immutable 别名 DateTimeImmutable::__construct()(0)
- date_create 别名 DateTime::__construct()(0)
- date_date_set 别名 DateTime::setDate()(0)
- date_default_timezone_get 取得一个脚本中所有日期时间函数所使用的默认时区(0)
- date_default_timezone_set 设定用于一个脚本中所有日期时间函数的默认时区(0)
- date_diff 别名 DateTime::diff()(0)
- date_format 别名 DateTime::format()(0)
- date_get_last_errors 别名 DateTime::getLastErrors()(0)
- date_interval_create_from_date_string 别名 DateInterval::createFromDateString()(0)
- date_interval_format 别名 DateInterval::format()(0)
- date_isodate_set 别名 DateTime::setISODate()(0)
- date_modify 别名 DateTime::modify()(0)
- date_offset_get 别名 DateTime::getOffset()(0)
- date_parse_from_format Get info about given date formatted according to the specified format(0)
- date_parse 返回指定日期/时间的详细信息的关联数组(0)
- date_sub 别名 DateTime::sub()(0)
- date_sun_info Returns an array with information about sunset/sunrise and twilight begin/end(0)
- date_sunrise 返回给定的日期与地点的日出时间(0)
- date_sunset 返回给定的日期与地点的日落时间(0)
- date_time_set 别名 DateTime::setTime()(0)
- date_timestamp_get 别名 DateTime::getTimestamp()(0)
- date_timestamp_set 别名 DateTime::setTimestamp()(0)
- date_timezone_get 别名 DateTime::getTimezone()(0)
- date_timezone_set 别名 DateTime::setTimezone()(0)
- date 格式化一个本地时间/日期(0)
- getdate 取得日期/时间信息(0)
- gettimeofday 取得当前时间(0)
- gmdate 格式化一个 GMT/UTC 日期/时间(0)
- gmmktime 取得 GMT 日期的 UNIX 时间戳(0)
- gmstrftime 根据区域设置格式化 GMT/UTC 时间/日期(0)
- idate 将本地时间日期格式化为整数(0)
- localtime 取得本地时间(0)
- microtime 返回当前 Unix 时间戳和微秒数(0)
- mktime 取得一个日期的 Unix 时间戳(0)
- strftime 根据区域设置格式化本地时间/日期(0)
- strptime 解析由 strftime() 生成的日期/时间(0)
- strtotime 将任何字符串的日期时间描述解析为 Unix 时间戳(0)
- time 返回当前的 Unix 时间戳(0)
- timezone_abbreviations_list 别名 DateTimeZone::listAbbreviations()(0)
- timezone_identifiers_list 别名 DateTimeZone::listIdentifiers()(0)
- timezone_location_get 别名 DateTimeZone::getLocation()(0)
- timezone_name_from_abbr Returns the timezone name from abbreviation(0)
- timezone_name_get 别名 DateTimeZone::getName()(0)
- timezone_offset_get 别名 DateTimeZone::getOffset()(0)
- timezone_open 别名 DateTimeZone::__construct()(0)
- timezone_transitions_get 别名 DateTimeZone::getTransitions()(0)
- timezone_version_get 获取 timezonedb 的版本(0)
- 目录函数(9)
- Fileinfo 函数(6)
- iconv 函数(11)
- 文件系统函数(81)
- 多字节字符串 函数(57)
- GD 和图像处理 函数(114)
- 可交换图像信息(5)
- Math 函数(50)
- 程序执行函数(11)
- PCNTL 函数(23)
- JSON 函数(4)
- SPL 函数(15)
- URL 函数(10)
- cURL 函数(32)
- 网络 函数(33)
- FTP 函数(36)
- Session 函数(23)
- PCRE 函数(11)
- PCRE 正则语法(19)
- 数组 函数(81)
- 类/对象 函数(18)
- 函数处理 函数(13)
- 变量处理 函数(37)
- SimpleXML 函数(3)
- 杂项 函数(31)
- 字符串 函数(101)