PHP timezone_name_from_abbr() 函数

PHP 教程 · 2019-01-24 10:42:28

实例

根据时区缩略语返回时区名称:

<?php
echo timezone_name_from_abbr("EST") . "<br>";
echo timezone_name_from_abbr("",7200,0);
?>

定义和用法

timezone_name_from_abbr() 根据时区缩略语返回时区名称。

语法

timezone_name_from_abbr(abbr,gmtoffset,isdst);

参数 描述
abbr 必需。规定时区缩略语。
gmtoffset 可选。规定相对于 GMT 的以秒为单位的偏移量。默认为 -1,表示返回第一个被找到的匹配缩略语的时区。否则搜索精确的偏移量。如果没有找到,则返回任意偏移量的第一个时区。
isdst 可选。规定夏令时指示器。
  • -1 = 默认。搜索时是否考虑时区的夏令时
  • 1 = 表示 gmtoffset 是受夏令时影响的一个偏移量
  • 0 = 表示 gmtoffset 是不受夏令时影响的一个偏移量

技术细节

返回值: 成功则返回时区名称,失败则返回 FALSE。
PHP 版本: 5.1.3+

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

The Little MLer

The Little MLer

Matthias Felleisen、Daniel P. Friedman、Duane Bibby、Robin Milner / The MIT Press / 1998-2-19 / USD 34.00

The book, written in the style of The Little Schemer, introduces instructors, students, and practicioners to type-directed functional programming. It covers basic types, quickly moves into datatypes, ......一起来看看 《The Little MLer》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具