PHPのtimezone_open()関数
例
DateTimeZoneを新しいオブジェクトを作成し、タイムゾーンの名前を返します。
<?php
$tz=timezone_open("Europe/Paris");
echo timezone_name_get($tz);
?>
$tz=timezone_open("Europe/Paris");
echo timezone_name_get($tz);
?>
実行中のインスタンス»
定義と使用法
新しいDateTimeZoneをオブジェクトを作成するためのtimezone_open()。
文法
timezone_open( timezone);
参数 | 描述 |
---|---|
timezone | 必需。规定一个时区。 提示: 查看 PHP 中支持的所有时区列表 |
技術的詳細
戻り値: | DateTimeZoneを成功、FALSEを返すために失敗した後、オブジェクトを返します。 |
---|---|
PHPバージョン: | 5.2+ |
PHPの日付/時刻のリファレンスマニュアル