@@ -96,6 +96,12 @@ public function formatProvider()
9696 $ dateTime = new \DateTime ('@0 ' );
9797 $ dateTimeImmutable = new \DateTimeImmutable ('@0 ' );
9898
99+ /* https://unicode-org.atlassian.net/browse/ICU-21647 */
100+ $ expectedQuarterX5 = '1 ' ;
101+ if (\defined ('INTL_ICU_VERSION ' ) && version_compare (\INTL_ICU_VERSION , '70.1 ' , '< ' )) {
102+ $ expectedQuarterX5 = '1st quarter ' ;
103+ }
104+
99105 $ formatData = [
100106 /* general */
101107 ['y-M-d ' , 0 , '1970-1-1 ' ],
@@ -144,13 +150,13 @@ public function formatProvider()
144150 ['QQ ' , 0 , '01 ' ],
145151 ['QQQ ' , 0 , 'Q1 ' ],
146152 ['QQQQ ' , 0 , '1st quarter ' ],
147- ['QQQQQ ' , 0 , ' 1st quarter ' ],
153+ ['QQQQQ ' , 0 , $ expectedQuarterX5 ],
148154
149155 ['q ' , 0 , '1 ' ],
150156 ['qq ' , 0 , '01 ' ],
151157 ['qqq ' , 0 , 'Q1 ' ],
152158 ['qqqq ' , 0 , '1st quarter ' ],
153- ['qqqqq ' , 0 , ' 1st quarter ' ],
159+ ['qqqqq ' , 0 , $ expectedQuarterX5 ],
154160
155161 // 4 months
156162 ['Q ' , 7776000 , '2 ' ],
@@ -363,6 +369,10 @@ public function formatWithTimezoneProvider()
363369 */
364370 public function testFormatTimezone ($ pattern , $ timezone , $ expected )
365371 {
372+ if ((80114 === \PHP_VERSION_ID || 80201 === \PHP_VERSION_ID ) && str_contains ($ timezone , 'GMT ' )) {
373+ $ this ->markTestSkipped ('Broken version of PHP ' );
374+ }
375+
366376 $ formatter = $ this ->getDefaultDateFormatter ($ pattern );
367377 $ formatter ->setTimeZone (new \DateTimeZone ($ timezone ));
368378
@@ -421,6 +431,10 @@ public function formatTimezoneProvider()
421431
422432 public function testFormatWithGmtTimezone ()
423433 {
434+ if (80114 === \PHP_VERSION_ID || 80201 === \PHP_VERSION_ID ) {
435+ $ this ->markTestSkipped ('Broken version of PHP ' );
436+ }
437+
424438 $ formatter = $ this ->getDefaultDateFormatter ('zzzz ' );
425439
426440 $ formatter ->setTimeZone ('GMT+03:00 ' );
@@ -430,6 +444,10 @@ public function testFormatWithGmtTimezone()
430444
431445 public function testFormatWithGmtTimeZoneAndMinutesOffset ()
432446 {
447+ if (80114 === \PHP_VERSION_ID || 80201 === \PHP_VERSION_ID ) {
448+ $ this ->markTestSkipped ('Broken version of PHP ' );
449+ }
450+
433451 $ formatter = $ this ->getDefaultDateFormatter ('zzzz ' );
434452
435453 $ formatter ->setTimeZone ('GMT+00:30 ' );
@@ -794,6 +812,10 @@ public function parseSecondProvider()
794812
795813 public function parseTimezoneProvider ()
796814 {
815+ if (80114 === \PHP_VERSION_ID || 80201 === \PHP_VERSION_ID ) {
816+ return [['y-M-d HH:mm:ss ' , '1970-1-1 00:00:00 ' , 0 ]];
817+ }
818+
797819 return [
798820 ['y-M-d HH:mm:ss zzzz ' , '1970-1-1 00:00:00 GMT-03:00 ' , 10800 ],
799821 ['y-M-d HH:mm:ss zzzz ' , '1970-1-1 00:00:00 GMT-04:00 ' , 14400 ],
@@ -912,6 +934,10 @@ public function testSetPattern()
912934 */
913935 public function testSetTimeZoneId ($ timeZoneId , $ expectedTimeZoneId )
914936 {
937+ if ((80114 === \PHP_VERSION_ID || 80201 === \PHP_VERSION_ID ) && str_contains ($ timeZoneId ?? '' , 'GMT ' )) {
938+ $ this ->markTestSkipped ('Broken version of PHP ' );
939+ }
940+
915941 $ formatter = $ this ->getDefaultDateFormatter ();
916942
917943 $ formatter ->setTimeZone ($ timeZoneId );
0 commit comments