MongoDB\BSON\UTCDateTime
PHP Manual

MongoDB\BSON\UTCDateTime::toDateTime

(mongodb >=1.0.0)

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

Beschreibung

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

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns the DateTime representation of this UTCDateTime.

Fehler/Exceptions

Beispiele

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

<?php

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

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

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

Siehe auch


MongoDB\BSON\UTCDateTime
PHP Manual