public function afterSave() { if ($this->dateDBformat) { $this->dateDBformat = false; $this->src_date = date(Yii::app()->locale->getDateFormat('phpshort'), strtotime($this->src_date)); } return parent::afterSave(); }
public function afterSave() { if ($this->dateDBformat) { $this->dateDBformat = false; $this->due_date = date(Yii::app()->locale->getDateFormat('phpdatetimes'), strtotime($this->due_date)); $this->issue_date = date(Yii::app()->locale->getDateFormat('phpdatetimes'), strtotime($this->issue_date)); $this->reg_date = date(Yii::app()->locale->getDateFormat('phpdatetimes'), strtotime($this->reg_date)); $this->ref_date = date(Yii::app()->locale->getDateFormat('phpdatetimes'), strtotime($this->ref_date)); } return parent::afterSave(); }