public function attributesToDefaultFormat($event)
    {
        $oldAttributes = $this->owner->oldAttributes;
        foreach ($this->attributes as $attribute) {
            $oldAttributeValue = $oldAttributes[$attribute];

            if ($this->owner->$attribute instanceof Carbon) {
                //If old attribute value is an integer, then we convert the current attribute value to the timestamp for prevent db errors
                if (is_numeric($oldAttributeValue)) {
                    $this->owner->$attribute = $this->owner->$attribute->timestamp;
                }
            }
        }
    }