When I try to format date from one timezone to same timezone I get wrong time (differenced by 1 hour). My code is:
$formatter = new IntlDateFormatter(
'ru_RU',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'Europe/Moscow'
);
$date = new DateTime("2015-07-29 14:00:00", new DateTimeZone('Europe/Moscow'));
echo $formatter->format($date);
Expected time is 14:00
, but 15:00
returns.
UPDATE: When I display year 2013 or 2014 everything is ok! What happens in 2015?
UPDATE2: +1 hour added from 26 october 2014. Its time when Russia goes to eternal winter time. Ok. But... how to format correctly?
I use directly 'GMT+03:00' instead 'Europe/Moscow'. Apparently the developers of the library do not have time for lawmakers.
If you have same problem, update icu (International Components for Unicode) at your OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With