php-doc-en/reference/intl/intlcalendar/gettimezone.xml
Gustavo André dos Santos Lopes 4a738f5ed6 Update IntlCalendar documentation
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330743 c90b9560-bf6c-de11-be94-00142212c4b1
2013-07-03 03:26:13 +00:00

120 lines
2.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="intlcalendar.gettimezone" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>IntlCalendar::getTimeZone</refname>
<refpurpose>Get the objectʼs timezone</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>IntlTimeZone</type><methodname>IntlCalendar::getTimeZone</methodname>
<void />
</methodsynopsis>
<para>
Returns the <classname>IntlTimeZone</classname> object associated with this
calendar.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
An <classname>IntlTimeZone</classname> object corresponding to the one used
internally in this object.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>IntlCalendar::getTimeZone</function></title>
<programlisting role="php">
<![CDATA[
<?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());
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
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
)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>IntlCalendar::setTimeZone</methodname></member>
<member><methodname>IntlCalendar::createInstance</methodname></member>
<member><methodname>IntlGregorianCalendar::__construct</methodname></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->