String representation of a UTCDateTime object

Using php I need to store a UTCDateTime in the mongoDB. The problem is, that in php land the MongoDB\BSON\UTCDateTime class has to be changed to one of array, string, int, float, bool, ArrayObject. Is there any way I can save the date as UTCDateTime in Mongodb, while giving an array, string, int, float, bool or ArrayObject to the driver?

Background:
Using symfony serializer to normalize my php Objects. In newer Symfony versions they added return types (array|string|int|float|bool|\ArrayObject|null) to the normalizer function. Now symfony errors out as i give back a UTCDateTime object.

    public function normalize($object, string $format = null, array $context = []) : UTCDatetime
    {
        return new UTCDateTime($object->getTimestamp() * 1000);
    }

Cheers
Florian