Commit efd74ae7 authored by Imre Horján-Berkes's avatar Imre Horján-Berkes Committed by Martijn de Wit
Browse files

Issue #3224626 by imre.horjan: Refactor calls to deprecated function datetime_date_default_time().

parent 0836b00d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -634,7 +634,7 @@ abstract class BootstrapDatepickerBase extends DateTimeWidgetBase implements Con
          case DateRangeItem::DATETIME_TYPE_DATE:
            // If this is a date-only field, set it to the default time so the
            // timezone conversion can be reversed.
            datetime_date_default_time($start_date);
            $start_date->setDefaultDateTime();
            $format = DateTimeItemInterface::DATE_STORAGE_FORMAT;
            break;

@@ -668,7 +668,7 @@ abstract class BootstrapDatepickerBase extends DateTimeWidgetBase implements Con
          case DateRangeItem::DATETIME_TYPE_DATE:
            // If this is a date-only field, set it to the default time so the
            // timezone conversion can be reversed.
            datetime_date_default_time($end_date);
            $end_date->setDefaultDateTime();
            $format = DateTimeItemInterface::DATE_STORAGE_FORMAT;
            break;

@@ -716,7 +716,7 @@ abstract class BootstrapDatepickerBase extends DateTimeWidgetBase implements Con
    if ($this->getFieldSetting('datetime_type') === DateTimeItem::DATETIME_TYPE_DATE) {
      // A date without time will pick up the current time, use the default
      // time.
      datetime_date_default_time($date);
      $date->setTime(12, 0, 0);
    }
    $date->setTimezone(new \DateTimeZone($timezone));