PHP 教程 PHP timezone_name_get() 函数

lemuel · 2022-03-07 10:56:25 · 热度: 6

实例

返回时区的名称:

<?php
$tz=timezone_open("Europe/Paris");
echo timezone_name_get($tz);
?>

定义和用法

timezone_name_get() 返回时区的名称。

语法

timezone_name_get(object);

参数 描述
object 必需。规定一个 DateTimeZone 对象。

技术细节

返回值: 时区列表中返回时区的名称。
PHP 版本: 5.2+

查看更多 PHP Date/Time 函数

猜你喜欢:
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册