reference/datetime/datetime/settimezone.xml
02ff7fef5b34cf8f5395180d9d39fb64d9398d00
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="datetime.settimezone" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>DateTime::setTimezone</refname>
...
...
@@ -11,12 +10,12 @@
11
10
<refsect1 role="description">
12
11
&reftitle.description;
13
12
<para>&style.oop;</para>
14
-
<methodsynopsis role="oop">
13
+
<methodsynopsis role="DateTime">
15
14
<modifier>public</modifier> <type>DateTime</type><methodname>DateTime::setTimezone</methodname>
16
15
<methodparam><type>DateTimeZone</type><parameter>timezone</parameter></methodparam>
17
16
</methodsynopsis>
18
17
<para>&style.procedural;</para>
19
-
<methodsynopsis role="procedural">
18
+
<methodsynopsis>
20
19
<type>DateTime</type><methodname>date_timezone_set</methodname>
21
20
<methodparam><type>DateTime</type><parameter>object</parameter></methodparam>
22
21
<methodparam><type>DateTimeZone</type><parameter>timezone</parameter></methodparam>
...
...
@@ -24,6 +23,14 @@
24
23
<para>
25
24
Sets a new timezone for a <classname>DateTime</classname> <type>object</type>.
26
25
</para>
26
+
<para>
27
+
Like <methodname>DateTimeImmutable::setTimezone</methodname> but works with
28
+
<classname>DateTime</classname>.
29
+
</para>
30
+
<para>
31
+
The procedural version takes the <classname>DateTime</classname> object as
32
+
its first argument.
33
+
</para>
27
34
</refsect1>
28
35

29
36
<refsect1 role="parameters">
...
...
@@ -45,7 +52,8 @@
45
52
<refsect1 role="returnvalues">
46
53
&reftitle.returnvalues;
47
54
<para>
48
-
&date.datetime.return.modifiedobjectorfalseforfailure;
55
+
Returns the <classname>DateTime</classname> object for method chaining. The
56
+
underlaying point-in-time is not changed when calling this method.
49
57
</para>
50
58
</refsect1>
51
59

...
...
@@ -90,13 +98,13 @@ echo date_format($date, 'Y-m-d H:i:sP') . "\n";
90
98
<refsect1 role="seealso">
91
99
&reftitle.seealso;
92
100
<simplelist>
101
+
<member><function>DateTimeImmutable::setTimezone</function></member>
93
102
<member><function>DateTime::getTimezone</function></member>
94
103
<member><function>DateTimeZone::__construct</function></member>
95
104
</simplelist>
96
105
</refsect1>
97
106

98
107
</refentry>
99
-

100
108
<!-- Keep this comment at the end of the file
101
109
Local variables:
102
110
mode: sgml
103
111