Php-function-timezone-name-from-abbr
提供:Dev Guides
PHP-関数timezone_name_from_abbr()
構文
timezone_name_from_abbr( $abbr [, $gmtOffset [, $is_dst]] );
定義と使い方
この関数は、略語からタイムゾーン名を返します。
パラメーター
Sr.No | Parameter & Description |
---|---|
1 |
abbr 必須。 タイムゾーンの略語。 |
2 |
gmtOffset オプションです。 GMTからの秒単位のオフセット。 |
3 |
is_dst オプションです。 夏時間インジケータ。 |
戻り値
成功した場合にタイムゾーン名、失敗した場合にFALSEを返します。
例
以下は、この機能の使用法です-
<?php
echo timezone_name_from_abbr("CET") . "<br/>";
echo timezone_name_from_abbr("", 3600, 0) . "\n";
?>
これは、次の結果を生成します-
Europe/Berlin
Europe/Paris