0
我需要将数据添加到在Drupal 7时间字段我试着使用日期字段添加数据连接到一个节点在Drupal 7
$node->field_test_a_updated[0]['value'] = $val;
$node->field_test_a_updated[0]['delta'] = 0;
$node->field_test_a_updated[0]['timezone'] = 'UTC';
$node->field_test_a_updated[0]['timezone_db'] = 'UTC';
$node->field_test_a_updated[0]['date_type'] = 'datetime';
其中$ VAL的值为“2010- 06-15T00:00:00-00:00" 。
当我尝试导入内容时,附加到该节点的所有其他字段都得到正确迁移,但日期字段除外。我也尝试使用[LANGUAGE_NONE]选项。
我相信我错过了与drupal7字段api有关的东西。
请帮助。