You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first, method formatDateTimeValue is dirty, because use two timezonedb for opposite operation. Time-to-object (with php tzdb), then object-to-string (with icu tzdb)
$DT = new \DateTime;
var_dump($DT->format('c')); //2015-12-17T17:05:02+03:00
var_dump(\Yii::$app->getFormatter()->asDatetime($DT)); //17 дек. 2015 г., 18:05:02
Assume, it's server software problem, but input value already contain TZ info, why not use it for cleanly behavior?
At second, updating timezonedb so hard on some systems, e.g. CentOS 6.x (with all updates and enabled popular update repos) now contain old libicu (Version: 50.1.2 Release Date: 2012-12-17). Updating (http://habrahabr.ru/post/241447/) is not trivial and stable.
I suggest, pass tz-argument for instantiate IntlDateFormatter as offset string (getted from \DateTime object). Result:
Narrow updates to only php-related tzdata (more friendly framework installing)
For not-updated environments behavior more cleanly (same result for internal and intl conversions)
Full BC, in my oppinion.
I can create PR for it.
The text was updated successfully, but these errors were encountered:
Problem still in December 2017. Letest CentOS 7, but libicu still same old version and updating still so hard.
Copied from #5128 (comment) (2 year ago)
At first, method formatDateTimeValue is dirty, because use two timezonedb for opposite operation. Time-to-object (with php tzdb), then object-to-string (with icu tzdb)
Assume, it's server software problem, but input value already contain TZ info, why not use it for cleanly behavior?
At second, updating timezonedb so hard on some systems, e.g. CentOS 6.x (with all updates and enabled popular update repos) now contain old libicu (Version: 50.1.2 Release Date: 2012-12-17). Updating (http://habrahabr.ru/post/241447/) is not trivial and stable.
I suggest, pass tz-argument for instantiate IntlDateFormatter as offset string (getted from \DateTime object). Result:
I can create PR for it.
The text was updated successfully, but these errors were encountered: