yii原生时间格式化函数有个好处,可以根据你的时区和语言翻译成比较好的时间格式。 Yii::app()->dateFormatter->formatDateTime($model->invoiceDate ));