Fix #76838: date_parse_from_format() changed meaning of zone value in PHP 7.2 -> BC break

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@345615 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2018-09-09 15:42:19 +00:00
parent 067b3bca39
commit 31af10a4a2
2 changed files with 36 additions and 1 deletions

View file

@ -318,6 +318,17 @@ int(2)
The <parameter>sql.safe_mode</parameter> ini setting has now been removed.
</para>
</sect2>
<sect2 xml:id="migration72.incompatible.date_parse_from_format">
<title>Changes to <function>date_parse_from_format</function></title>
<para>
The <literal>zone</literal> element of the array returned by
<function>date_parse_from_format</function> represents seconds instead of
minutes now, and its sign is inverted. For instance <literal>-120</literal>
is now <literal>7200</literal>.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file

View file

@ -51,6 +51,30 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.2.0</entry>
<entry>
The <literal>zone</literal> element of the returned array represents
seconds instead of minutes now, and its sign is inverted. For instance
<literal>-120</literal> is now <literal>7200</literal>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -88,7 +112,7 @@ Array
[is_localtime] => 1
[zone_type] => 1
[zone] => -60
[zone] => 3600
[is_dst] =>
)
]]>