Fix created_on and modified_on fields on insert and update

On insert verify if created_on and modified_on is set and value is empty  and set it $this->set_date()
On update do not update created_on field an with empty date and update modified_on field