private function convertDatetimeToUTC($object, $schema, \DateTimeZone $timezone)
    {
        foreach ($schema->properties as $field => $property) {
            if (isset($property->format) && $property->format == 'date-time' && isset($object->{$field})) {
                $dateTime = Rfc3339::createFromString($object->{$field});
                $dateTime->setTimezone($timezone);
                $object->{$field} = $dateTime->format(\DateTime::ISO8601);
            } elseif (isset($property->properties) && isset($object->{$field})) {
                $object->{$field} = $this->convertDatetimeToUTC($object->{$field}, $property, $timezone);
            }
        }
        return $object;
    }