table = 'block_history'; $this->pkey = 'email'; $dateTimeNow = new \DateTime('NOW'); $dateTimeNow->setTimezone(new \DateTimeZone('UTC')); $this->currentDate = $dateTimeNow->format('Y-m-d H:i:s'); } public function save($element) { $element->block_date = $this->currentDate; $element->block_action = $this->block_action; return parent::save($element); } }