mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Clarify MongoDB\BSON\UTCDateTime::toDateTime() time zone
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339806 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c1194eea59
commit
a5da28f0e1
1 changed files with 12 additions and 2 deletions
|
@ -26,7 +26,8 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the <classname>DateTime</classname> representation of this
|
||||
UTCDateTime.
|
||||
UTCDateTime. The returned <classname>DateTime</classname> will use the UTC
|
||||
time zone.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -48,7 +49,9 @@
|
|||
|
||||
$utcdatetime = new MongoDB\BSON\UTCDateTime(1416445411987);
|
||||
$datetime = $utcdatetime->toDateTime();
|
||||
var_dump($datetime->format(DATE_RSS));
|
||||
var_dump($datetime->format('r'));
|
||||
var_dump($datetime->format('U.u'));
|
||||
var_dump($datetime->getTimezone());
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
@ -57,6 +60,13 @@ var_dump($datetime->format(DATE_RSS));
|
|||
<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>
|
||||
|
|
Loading…
Reference in a new issue