reference/datetime/datetimeinterface/gettimezone.xml
02ff7fef5b34cf8f5395180d9d39fb64d9398d00
...
...
@@ -1,11 +1,10 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="datetime.gettimezone" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
-
<refname>DateTime::getTimezone</refname>
7
-
<refname>DateTimeImmutable::getTimezone</refname>
8
5
<refname>DateTimeInterface::getTimezone</refname>
6
+
<refname>DateTimeImmutable::getTimezone</refname>
7
+
<refname>DateTime::getTimezone</refname>
9
8
<refname>date_timezone_get</refname>
10
9
<refpurpose>Return time zone relative to given DateTime</refpurpose>
11
10
</refnamediv>
...
...
@@ -13,21 +12,21 @@
13
12
<refsect1 role="description">
14
13
&reftitle.description;
15
14
<para>&style.oop;</para>
16
-
<methodsynopsis role="oop">
17
-
<modifier>public</modifier> <type>DateTimeZone</type><methodname>DateTime::getTimezone</methodname>
15
+
<methodsynopsis role="DateTimeInterface">
16
+
<modifier>public</modifier> <type class="union"><type>DateTimeZone</type><type>false</type></type><methodname>DateTimeInterface::getTimezone</methodname>
18
17
<void/>
19
18
</methodsynopsis>
20
19
<methodsynopsis role="DateTimeImmutable">
21
-
<modifier>public</modifier> <type>DateTimeZone</type><methodname>DateTimeImmutable::getTimezone</methodname>
20
+
<modifier>public</modifier> <type class="union"><type>DateTimeZone</type><type>false</type></type><methodname>DateTimeImmutable::getTimezone</methodname>
22
21
<void/>
23
22
</methodsynopsis>
24
-
<methodsynopsis role="DateTimeInterface">
25
-
<modifier>public</modifier> <type>DateTimeZone</type><methodname>DateTimeInterface::getTimezone</methodname>
23
+
<methodsynopsis role="DateTime">
24
+
<modifier>public</modifier> <type class="union"><type>DateTimeZone</type><type>false</type></type><methodname>DateTime::getTimezone</methodname>
26
25
<void/>
27
26
</methodsynopsis>
28
27
<para>&style.procedural;</para>
29
-
<methodsynopsis role="procedural">
30
-
<type>DateTimeZone</type><methodname>date_timezone_get</methodname>
28
+
<methodsynopsis>
29
+
<type class="union"><type>DateTimeZone</type><type>false</type></type><methodname>date_timezone_get</methodname>
31
30
<methodparam><type>DateTimeInterface</type><parameter>object</parameter></methodparam>
32
31
</methodsynopsis>
33
32
<para>
...
...
@@ -58,7 +57,7 @@
58
57
<programlisting role="php">
59
58
<![CDATA[
60
59
<?php
61
-
$date = new DateTime(null, new DateTimeZone('Europe/London'));
60
+
$date = new DateTimeImmutable(null, new DateTimeZone('Europe/London'));
62
61
$tz = $date->getTimezone();
63
62
echo $tz->getName();
64
63
?>
...
...
@@ -91,7 +90,6 @@ Europe/London
91
90
</refsect1>
92
91

93
92
</refentry>
94
-

95
93
<!-- Keep this comment at the end of the file
96
94
Local variables:
97
95
mode: sgml
98
96