core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php index 3fe189f..3713412 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php @@ -4,6 +4,7 @@ use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\TypedData\Type\DateTimeInterface; +use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; /** * A data type for ISO 8601 date strings. @@ -23,10 +24,10 @@ class DateTimeIso8601 extends StringData implements DateTimeInterface { public function getDateTime() { if ($this->value) { if (is_array($this->value)) { - $datetime = DrupalDateTime::createFromArray($this->value); + $datetime = DrupalDateTime::createFromArray($this->value, DateTimeItemInterface::STORAGE_TIMEZONE); } else { - $datetime = new DrupalDateTime($this->value); + $datetime = new DrupalDateTime($this->value, DateTimeItemInterface::STORAGE_TIMEZONE); } return $datetime; }