Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion reference/mongodb/bson/utcdatetime/todatetime.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- $Revision$ -->

<refentry xml:id="mongodb-bson-utcdatetime.todatetime" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -74,6 +74,7 @@ object(DateTimeZone)#3 (2) {
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>MongoDB\BSON\UTCDateTime::toDateTimeImmutable</methodname></member>
<member><link xlink:href="&url.mongodb.docs.bson;#date">BSON Types: Date</link></member>
</simplelist>
</refsect1>
Expand Down
103 changes: 103 additions & 0 deletions reference/mongodb/bson/utcdatetime/todatetimeimmutable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="mongodb-bson-utcdatetime.todatetimeimmutable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\BSON\UTCDateTime::toDateTimeImmutable</refname>
<refpurpose>Returns the DateTimeImmutable representation of this UTCDateTime</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type>DateTimeImmutable</type><methodname>MongoDB\BSON\UTCDateTime::toDateTimeImmutable</methodname>
<void />
</methodsynopsis>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the <classname>DateTimeImmutable</classname> representation of this
UTCDateTime. The returned <classname>DateTimeImmutable</classname> will use the UTC
time zone.
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simplelist>
&mongodb.throws.argumentparsing;
</simplelist>
</refsect1>


<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>MongoDB\BSON\UTCDatetime::toDateTimeImmutable</function> example</title>
<programlisting role="php">
<![CDATA[
<?php

$utcdatetime = new MongoDB\BSON\UTCDateTime(1416445411987);
$datetime = $utcdatetime->toDateTimeImmutable();
var_dump($datetime->format('r'));
var_dump($datetime->format('U.u'));
var_dump($datetime->getTimezone());

?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
string(31) "Thu, 20 Nov 2014 01:03:31 +0000"
string(17) "1416445411.987000"
object(DateTimeZone)#3 (2) {
["timezone_type"]=>
int(1)
["timezone"]=>
string(6) "+00:00"
}
]]>
</screen>
</example>
</refsect1>


<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>MongoDB\BSON\UTCDateTime::toDateTime</methodname></member>
<member><link xlink:href="&url.mongodb.docs.bson;#date">BSON Types: Date</link></member>
</simplelist>
</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
-->
1 change: 1 addition & 0 deletions reference/mongodb/versions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@
<function name='mongodb\bson\utcdatetime::__tostring' from='mongodb &gt;=1.0.0'/>
<function name='mongodb\bson\utcdatetime::jsonserialize' from='mongodb &gt;=1.2.0'/>
<function name='mongodb\bson\utcdatetime::todatetime' from='mongodb &gt;=1.0.0'/>
<function name='mongodb\bson\utcdatetime::todatetimeimmutable' from='mongodb &gt;=1.20.0'/>
<function name='mongodb\bson\utcdatetime::serialize' from='mongodb &gt;=1.2.0'/>
<function name='mongodb\bson\utcdatetime::unserialize' from='mongodb &gt;=1.2.0'/>

Expand Down
Loading