Adding content to Paragraph Date Field Drupal 8 I'm programmatically creating paragraphs using the following code, but I'm unable to get the date value to store correctly within the date field. It seems to store within the database, yet on the edit page/form for the node, it remains as a blank field.

Any suggestions or insight would be appreciated. 

//SET THE DATE
$date = new DrupalDateTime('2017-10-24 13:30:00');

//CREATE THE NEW PARAGRAPH
$paragraph = Paragraph::create([
    'type' =&gt; 'event_venue',
    'field_tickets' =&gt; [
        ["value"  =&gt;  'Adult Update 1|£30'],
        ["value"  =&gt;  'Adult Update 2|£130']
        ],
    'field_date' =&gt; array($date-&gt;format('Y-m-d H:i:s')),

]);

//SAVE THE PARAGRAPH SO WE CAN ADD THE ENTITY ID TO THE NODE
$paragraph-&gt;save();

//LOAD THE NODE
$node = entity_load('node', $nid);

//ADD PARAGRAPH TO THE NODE
$node-&gt;field_dates = array(
    array(
      'target_id' =&gt; $venue_information-&gt;id(),
      'target_revision_id' =&gt; $venue_information-&gt;getRevisionId(),
    )
);

//SAVE THE NODE
$nid = $node-&gt;save();
Use the global constant DATETIME_DATETIME_STORAGE_FORMAT to format the date:

// If the time is in a different timezone then adjust it to UTC before you save it
$date-&gt;setTimezone(new \DateTimezone(DATETIME_STORAGE_TIMEZONE));

$paragraph = Paragraph::create([
  ...
  'field_date' =&gt; [
    'value' =&gt; $date-&gt;format(DATETIME_DATETIME_STORAGE_FORMAT),
  ],
]);


Edit

For Drupal >= 8.5: Global constants in datetime.module are deprecated and DateTimeItemInterface has been introduced.