public function beforeSave()
{
$this->update_time = new CDbExpression('NOW()');
$this->date = date('Y-m-d', strtotime($this->date));
if ($this->getIsNewRecord()) {
$this->create_time = $this->update_time;
$this->user_id = Yii::app()->getUser()->getId();
}
return parent::beforeSave();
}