Please wait while we load your page...
 

Announcements

PHP Manual :: MongoDB\BSON\UTCDateTime::toDateTime



MongoDB\BSON\UTCDateTime::__construct || MongoDB\BSON\UTCDateTime::__toString || MongoDB\BSON\UTCDateTime || PHP Manual

(mongodb >=1.0.0)

MongoDB\BSON\UTCDateTime::toDateTimeReturns the DateTime representation of this UTCDateTime

Description

final public DateTime MongoDB\BSON\UTCDateTime::toDateTime ( void )

Parameters

This function has no parameters.

Return Values

Returns the DateTime representation of this UTCDateTime.

Errors/Exceptions

Examples

Example #1 MongoDB\BSON\UTCDatetime::toDateTime() example

<?php

$utcdatetime 
= new MongoDB\BSON\UTCDateTime(1416445411987);
$datetime $utcdatetime->toDateTime();
var_dump($datetime->format(DATE_RSS));

?>

The above example will output something similar to:

string(31) "Thu, 20 Nov 2014 01:03:31 +0000"


MongoDB\BSON\UTCDateTime::__construct || MongoDB\BSON\UTCDateTime::__toString || MongoDB\BSON\UTCDateTime || PHP Manual
Live Chat Not Available