TimeZone has been set, but Formatter formatting does not work. it is still in English format. {code ...} server Output: {code ...} good local: {code ...} why ~ The server php5.5.9 local php5.6.11 has been set
timeZone, But use
FormatterFormatting does not work. it is still in English format.
'timeZone' => 'Asia/Shanghai'dd( date_default_timezone_get(), Yii::$app->getTimeZone(), Yii::$app->formatter->timeZone, Yii::$app->formatter->asDate('2016-05-15'), date('Y-m-d H:i:s'));
Server Output:
"Asia/Shanghai""Asia/Shanghai""Asia/Shanghai""May 15, 2016""2016-06-16 15:54:53"
Local is good:
"Asia/Shanghai" "May 15, 2016" 15:54:45"
Why ~
Serverphp 5.5.9
Localphp 5.6.11
Reply content:
SettimeZone, But useFormatterFormatting does not work. it is still in English format.
'timeZone' => 'Asia/Shanghai'dd( date_default_timezone_get(), Yii::$app->getTimeZone(), Yii::$app->formatter->timeZone, Yii::$app->formatter->asDate('2016-05-15'), date('Y-m-d H:i:s'));
Server Output:
"Asia/Shanghai""Asia/Shanghai""Asia/Shanghai""May 15, 2016""2016-06-16 15:54:53"
Local is good:
"Asia/Shanghai" "May 15, 2016" 15:54:45"
Why ~
Serverphp 5.5.9
Localphp 5.6.11
AndphpThe version should be okay. check whether the time parameter format in your configuration file is different.