May 18, 2018 in Drupal 8, Snippets
$date = strtotime($importObject->created_at); // which is a date format
$node->set('created', $date);
// $node->save(); etc