Email us at info@henrytech.org to discuss your Drupal Migration today!
// Set the current date and time. $node = Node::load(1); $node->set('field_date', date('Y-m-d', time())); $node->set('field_datetime', date('Y-m-d\TH:i:s', time())); $node->set('created', time()); $node->save();