|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-18 11:46 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2016-05-18 11:46 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
Description: ------------ How to reproduce: create a DateTime object $dateTime with value of year 2015 (haven't tested other years), set any Russian timezone (e.g. Europe/Moscow), check the result of $dateTime->format('H:i') and compare with result of IntlDateFormatter::format with the same timezone. Problem exists in versions 5.6.20+dfsg-0+deb8u1 (debian jessie), 5.4.45 (CentOS) and 7.0.4 (Ubuntu). There was a similar bug (68434), marked as closed with a comment stating that "the data at least should be updated in the next release." Well, it certainly should, since 2014. Test script: --------------- $now = new \DateTime(); $russian = new\DateTimeZone('Europe/Moscow'); $now->setTimezone($russian); $fmt = new IntlDateFormatter( 'en-US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Moscow', IntlDateFormatter::GREGORIAN ); echo $now->format('Y-m-d H:i:s'); echo $fmt->format($now); Expected result: ---------------- 2016-05-17 21:26:38 Tuesday, May 17, 2016 at 09:26:38 PM Moscow Standard Time Actual result: -------------- 2016-05-17 21:26:38 Tuesday, May 17, 2016 at 10:26:38 PM Moscow Standard Time