Returns the DateTime representation of this UTCDateTimeInterface

- « MongoDB\BSON\UTCDateTimeInterface

- MongoDB\BSON\UTCDateTimeInterface::__toString »

- PHP Manual
- MongoDB\BSON\UTCDateTimeInterface
- Returns the DateTime representation of this UTCDateTimeInterface

# MongoDB\BSON\UTCDateTimeInterface::toDateTime

(mongodb >=1.3.0)

MongoDB\BSON\UTCDateTimeInterface::toDateTime — Returns the DateTime representation of this UTCDateTimeInterface

### Description

abstract public MongoDB\BSON\UTCDateTimeInterface::toDateTime(): DateTime

### Parameters

This function has no parameters.

### Return Values

Returns the DateTime representation of this UTCDateTimeInterface. The returned DateTime should use the UTC time zone.

### See Also

- MongoDB\BSON\UTCDateTime::toDateTime() - Returns the DateTime representation of this UTCDateTime