public function afterFind() { $this->start_time = !$this->start_time ? '' : date('Y-m-d', strtotime($this->start_time)); $this->end_time = !$this->end_time ? '' : date('Y-m-d', strtotime($this->end_time)); parent::afterFind(); }