diff --git a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php index 8ddd60b..eeb733d 100644 --- a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +++ b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php @@ -312,7 +312,10 @@ public function providerTestDates() { // On 32-bit systems, timestamps are limited to 1901-2038. if (PHP_INT_SIZE > 4) { // Create a date object in the distant past. - $dates[] = ['1809-02-12 10:30', 'America/Chicago', '1809-02-12T10:30:00-06:00']; + // @see https://3v4l.org/vve0b + if (version_compare(PHP_VERSION, '5.6.20', '>=')) { + $dates[] = ['1809-02-12 10:30', 'America/Chicago', '1809-02-12T10:30:00-06:00']; + } // Create a date object in the far future. $dates[] = ['2345-01-02 02:04', 'UTC', '2345-01-02T02:04:00+00:00']; } @@ -345,7 +348,10 @@ public function providerTestDateArrays() { // On 32-bit systems, timestamps are limited to 1901-2038. if (PHP_INT_SIZE > 4) { // Create a date object in the distant past. - $dates[] = [['year' => 1809, 'month' => 2, 'day' => 12], 'America/Chicago', '1809-02-12T00:00:00-06:00']; + // @see https://3v4l.org/vve0b + if (version_compare(PHP_VERSION, '5.6.20', '>=')) { + $dates[] = [['year' => 1809, 'month' => 2, 'day' => 12], 'America/Chicago', '1809-02-12T00:00:00-06:00']; + } // Create a date object in the far future. $dates[] = [['year' => 2345, 'month' => 1, 'day' => 2], 'UTC', '2345-01-02T00:00:00+00:00']; }