Closed evgenmil closed 8 years ago
Failed to reproduce on basic app template
date_default_timezone_set("Asia/Yekaterinburg");
echo date(DATE_RFC2822);
echo "<br />";
Yii::$app->setTimeZone("Asia/Yekaterinburg");
echo Yii::$app->formatter->asDatetime(time(), 'long');
returns
Mon, 23 Nov 2015 19:27:45 +0500
23 ноября 2015 г., 19:27:45 GMT+5
PHP Version 5.6.11-1ubuntu3.1 date/time support — enabled "Olson" Timezone Database Version — 0.system Timezone Database — internal Default timezone — Asia/Yekaterinburg
Internationalization support — enabled version — 1.1.0 ICU version — 55.1 ICU Data version — 55.1
@evgenmil seems the timezone database in your intl library is outdated...
http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#setup-environment
Additionally the information in the time zone database shipped with the ICU library may be outdated. Please refer to the ICU manual for details on updating the time zone database. While for output formatting the ICU timezone database is used, the time zone database used by PHP may be relevant too. You can update it by installing the latest version of the pecl package timezonedb.
Thanks
that is, it is directly dependent on my version of ICU 50.1.2
Hello. The time now is (in fact) 17:30 Current time zone (in fact) GMT +05: 00
Simple file:
returns
Mon, 23 Nov 2015 17:30:35 +0500
Output the through yii2:
returns
23 ноября 2015 г., 18:30:35 GMT+06:00
phpinfo(): PHP Version 5.4.45 date/time support — enabled "Olson" Timezone Database Version — 2015.7 Internationalization support — enabled version — PECL-3.0.0 ICU version — 50.1.2 ICU Data version — 50.1
Tell me, please, what's the problem? Why through yii2 +06? Thank you.