PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

IntlCalendar::getTimeZone - Get the object?s timezone | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

IntlCalendar::getTimeZone

(PHP 5.5.0, PHP 7, PECL >= 3.0.0a1)

IntlCalendar::getTimeZoneGet the object?s timezone

説明

オブジェクト指向型

public IntlTimeZone IntlCalendar::getTimeZone ( void )

手続き型

IntlTimeZone intlcal_get_time_zone ( IntlCalendar $cal )

Returns the IntlTimeZone object associated with this calendar.

パラメータ

cal

The IntlCalendar resource.

返り値

An IntlTimeZone object corresponding to the one used internally in this object.

例1 IntlCalendar::getTimeZone()

<?php
ini_set
('date.timezone''Europe/Lisbon');
ini_set('intl.default_locale''en_US');

$cal IntlCalendar::createInstance();
print_r($cal->getTimeZone());

$cal->setTimeZone('UTC');
print_r($cal->getTimeZone());

$cal IntlCalendar::fromDateTime('2012-01-01 00:00:00 GMT+03:33');
print_r($cal->getTimeZone());

上の例の出力は以下となります。

IntlTimeZone Object
(
    [valid] => 1
    [id] => Europe/Lisbon
    [rawOffset] => 0
    [currentOffset] => 3600000
)
IntlTimeZone Object
(
    [valid] => 1
    [id] => UTC
    [rawOffset] => 0
    [currentOffset] => 0
)
IntlTimeZone Object
(
    [valid] => 1
    [id] => GMT+03:33
    [rawOffset] => 12780000
    [currentOffset] => 12780000
)

参考


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「IntlCalendar::getTimeZone - Get the object?s timezone」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | IntlCalendar::getTimeZone - Get the object?s timezone」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: