By robert774 on
Hello
I try to create node:
...
$values['title'] = 'title';
$values['body']= 'body';
$values['name'] = "myname";
$values['status'] = 1;
drupal_execute('news_node_form', $values, $node);
it works. But i dont know how to insert creation date, i try:
$values['date']='2009-09-20 14:25:04 +0200';
or
$values['created'] =time()+ (7 * 24 * 60 * 60);
with different configuration and no success. Drupal always insert current creation date.
plz help
Comments
maybe 007-03-03T00:00:00,
maybe 2007-03-03T00:00:00, that is the date format for cck date if I remember correctly.
have you tried the devel module to see sample format of the field?
It can be done. You need to
It can be done. You need to do some massaging of the $form_state['values'] just before you run drupal_execute in uc_order_node_create. Here's how I got it going (for a single date field):
Civicsolar
http://www.civicsolar.com