PHP 7.0.6 Released

MongoDB\BSON\UTCDateTime::toDateTime

(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"

User Contributed Notes

There are no user contributed notes for this page.
To Top