Manually enter custom timestamp
Another solution is assigning the created property of the $node object before calling $node-&gt;save.

e.g.

$body_text = 'This is the body text I want entered with the node.';
$created_time = time();

$node = new stdClass();
$node-&gt;type = 'article';
node_object_prepare($node);

$node-&gt;title    = 'Node Created Programmatically on ' . date('c');
$node-&gt;language = LANGUAGE_NONE;

$node-&gt;body[$node-&gt;language][0]['value']   = $body_text;
$node-&gt;body[$node-&gt;language][0]['summary'] = text_summary($body_text);
$node-&gt;body[$node-&gt;language][0]['format']  = 'filtered_html';

$path = 'content/programmatically_created_node_' . date('YmdHis');
$node-&gt;path = array('alias' =&gt; $path);

$node-&gt;created = $created_time;

node_save($node);


For more information please see the API docs on node_save().

The solution above has the added bonus of not requiring additional databases queries to clean up the timestamps after the node was created.