Returns the DateTimeImmutable representation of this UTCDateTimeInterface

- « MongoDB\BSON\UTCDateTimeInterface::toDateTime

- MongoDB\BSON\UTCDateTimeInterface::__toString »

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

# MongoDB\BSON\UTCDateTimeInterface::toDateTimeImmutable

(mongodb >=2.0.0)

MongoDB\BSON\UTCDateTimeInterface::toDateTimeImmutable — Returns the DateTimeImmutable representation of this UTCDateTimeInterface

### Description

abstract public MongoDB\BSON\UTCDateTimeInterface::toDateTimeImmutable(): DateTimeImmutable

### Parameters

This function has no parameters.

### Return Values

Returns the DateTimeImmutable representation of this UTCDateTimeInterface. The returned DateTimeImmutable will use the UTC time zone.

### See Also

- MongoDB\BSON\UTCDateTime::toDateTimeImmutable() - Returns the DateTimeImmutable representation of this UTCDateTime