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

查看所有标签

iGen

iGen

Jean M. Twenge PhD / Atria Books / 2017-8-22 / USD 27.00

A highly readable and entertaining first look at how today’s members of iGen—the children, teens, and young adults born in the mid-1990s and later—are vastly different from their Millennial predecesso......一起来看看 《iGen》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

html转js在线工具
html转js在线工具

html转js在线工具