public function beforeValidate() { if ($this->start_date != '') { $this->start_at = DDateTimeHelper::DateToUnix($this->start_date); } return parent::beforeValidate(); }