No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

IntlCalendar::getTimeZone

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

IntlCalendar::getTimeZoneGet the objectʼs timezone

Description

Object oriented style

public IntlCalendar::getTimeZone ( void ) : IntlTimeZone

Procedural style

intlcal_get_time_zone ( IntlCalendar $cal ) : IntlTimeZone

Returns the IntlTimeZone object associated with this calendar.

PHP: IntlCalendar::getTimeZone - Manual Home of Manuel PHP  Contents Haut

Return Values

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

PHP: IntlCalendar::getTimeZone - Manual Home of Manuel PHP  Contents Haut

Examples

Example #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());

The above example will output:

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
)

PHP: IntlCalendar::getTimeZone - Manual Home of Manuel PHP  Contents Haut

See Also

Find a PHP function
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph