yii2时区语言设置
main.php
return [
'charset' => 'utf-8',
'language' => 'zh-CN',
'timeZone' => 'Asia/Shanghai',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache'
],
'formatter' => [
'dateFormat' => 'yyyy-MM-dd',
'timeFormat' => 'HH:mm:ss',
'datetimeFormat' => 'yyyy-MM-dd HH:mm:ss'
]
]
];