Loading src/Plugin/Field/FieldWidget/BootstrapDatepickerBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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)); Loading Loading
src/Plugin/Field/FieldWidget/BootstrapDatepickerBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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)); Loading