value) { if (is_array($this->value)) { // Data of this type must always be stored in UTC. $datetime = DrupalDateTime::createFromArray($this->value, 'UTC'); } else { // Data of this type must always be stored in UTC. $datetime = new DrupalDateTime($this->value, 'UTC'); } return $datetime; } } /** * {@inheritdoc} */ public function setDateTime(DrupalDateTime $dateTime, $notify = TRUE) { $this->value = $dateTime->format('c'); // Notify the parent of any changes. if ($notify && isset($this->parent)) { $this->parent->onChange($this->name); } } }