summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-02-06 17:02:24 (GMT)
committerNathaniel Catchpole2017-02-06 17:02:24 (GMT)
commit2f18ae0c9f18a416b5020c5901854775cf2f3e1b (patch)
tree0137dac82bc19178683f280b2e7394ef50354cb8
parentbb25a5b766f6f5e16e648f2941fb642d9acf8b8e (diff)
Revert "Issue #2795489 by mpdonadio, cilefen, ednawig: 2038 bug with PHP timestamps on 32-bit systems - warn users?"
This reverts commit bb25a5b766f6f5e16e648f2941fb642d9acf8b8e.
-rw-r--r--core/modules/system/system.install10
-rw-r--r--core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php24
2 files changed, 2 insertions, 32 deletions
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 14ec3cf..27abfa0 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -921,16 +921,6 @@ function system_requirements($phase) {
}
}
- // Check to see if dates will be limited to 1901-2038.
- if (PHP_INT_SIZE === 4) {
- $requirements['limited_date_range'] = [
- 'title' => t('Limited Date Range'),
- 'value' => t('Your PHP installation has a limited date range.'),
- 'description' => t('You are running on a system where PHP is compiled or limited to using 32-bit integers. This will limit the range of dates and timestamps to the years 1901-2038.'),
- 'severity' => REQUIREMENT_WARNING,
- ];
- }
-
return $requirements;
}
diff --git a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
index 7dcb0a5..ddbcf6a 100644
--- a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
+++ b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
@@ -293,7 +293,7 @@ class DateTimePlusTest extends UnitTestCase {
* @see DateTimePlusTest::testDates()
*/
public function providerTestDates() {
- $dates = array(
+ return array(
// String input.
// Create date object from datetime string.
array('2009-03-07 10:30', 'America/Chicago', '2009-03-07T10:30:00-06:00'),
@@ -308,16 +308,6 @@ class DateTimePlusTest extends UnitTestCase {
// Same during daylight savings time.
array('2009-06-07 10:30', 'Australia/Canberra', '2009-06-07T10:30:00+10:00'),
);
-
- // On 32-bit systems, timestamps are limited to 1901-2038.
- if (PHP_INT_SIZE !== 4) {
- // Create a date object in the distant past.
- $dates[] = array('1809-02-12 10:30', 'America/Chicago', '1809-02-12T10:30:00-06:00');
- // Create a date object in the far future.
- $dates[] = array('2345-01-02 02:04', 'UTC', '2345-01-02T02:04:00+00:00');
- }
-
- return $dates;
}
/**
@@ -330,7 +320,7 @@ class DateTimePlusTest extends UnitTestCase {
* @see DateTimePlusTest::testDates()
*/
public function providerTestDateArrays() {
- $dates = array(
+ return array(
// Array input.
// Create date object from date array, date only.
array(array('year' => 2010, 'month' => 2, 'day' => 28), 'America/Chicago', '2010-02-28T00:00:00-06:00'),
@@ -341,16 +331,6 @@ class DateTimePlusTest extends UnitTestCase {
// Create date object from date array with hour.
array(array('year' => 2010, 'month' => 2, 'day' => 28, 'hour' => 10), 'Europe/Berlin', '2010-02-28T10:00:00+01:00'),
);
-
- // On 32-bit systems, timestamps are limited to 1970-2038.
- if (PHP_INT_SIZE !== 4) {
- // Create a date object in the distant past.
- $dates[] = array(array('year' => 1809, 'month' => 2, 'day' => 12), 'America/Chicago', '1809-02-12T00:00:00-06:00');
- // Create a date object in the far future.
- $dates[] = array(array('year' => 2345, 'month' => 1, 'day' => 2), 'UTC', '2345-01-02T00:00:00+00:00');
- }
-
- return $dates;
}
/**