Update to drupal-org-drupal 8.0.0-rc2. For more information, see https://www.drupal.org/node/2598668
This commit is contained in:
parent
f32e58e4b1
commit
8e18df8c36
3062 changed files with 15044 additions and 172506 deletions
|
@ -203,7 +203,7 @@ class DateTimePlus {
|
|||
$datetimeplus = new static('', $timezone, $settings);
|
||||
|
||||
$date = \DateTime::createFromFormat($format, $time, $datetimeplus->getTimezone());
|
||||
if (!$date instanceOf \DateTime) {
|
||||
if (!$date instanceof \DateTime) {
|
||||
throw new \Exception('The date cannot be created from a format.');
|
||||
}
|
||||
else {
|
||||
|
@ -212,10 +212,10 @@ class DateTimePlus {
|
|||
// re-creating the date/time formatted string and comparing it to the input. For
|
||||
// instance, an input value of '11' using a format of Y (4 digits) gets
|
||||
// created as '0011' instead of '2011'.
|
||||
if ($date instanceOf DateTimePlus) {
|
||||
if ($date instanceof DateTimePlus) {
|
||||
$test_time = $date->format($format, $settings);
|
||||
}
|
||||
elseif ($date instanceOf \DateTime) {
|
||||
elseif ($date instanceof \DateTime) {
|
||||
$test_time = $date->format($format);
|
||||
}
|
||||
$datetimeplus->setTimestamp($date->getTimestamp());
|
||||
|
@ -345,7 +345,7 @@ class DateTimePlus {
|
|||
*/
|
||||
protected function prepareTimezone($timezone) {
|
||||
// If the input timezone is a valid timezone object, use it.
|
||||
if ($timezone instanceOf \DateTimezone) {
|
||||
if ($timezone instanceof \DateTimezone) {
|
||||
$timezone_adjusted = $timezone;
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ class DateTimePlus {
|
|||
|
||||
// Default to the system timezone when not explicitly provided.
|
||||
// If the system timezone is missing, use 'UTC'.
|
||||
if (empty($timezone_adjusted) || !$timezone_adjusted instanceOf \DateTimezone) {
|
||||
if (empty($timezone_adjusted) || !$timezone_adjusted instanceof \DateTimezone) {
|
||||
$system_timezone = date_default_timezone_get();
|
||||
$timezone_name = !empty($system_timezone) ? $system_timezone : 'UTC';
|
||||
$timezone_adjusted = new \DateTimeZone($timezone_name);
|
||||
|
|
Reference in a new issue