In D6, node_save() would always update the node->changed time. In D7, the time is only updated once because node->changed is empty via the code in node_save() at:

// The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
if (empty($node->changed)) {
$node->changed = REQUEST_TIME;
}

Therefore, custom node modules must manually change the updated time in their code like what was done in the D6 node_save() via:

// The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
$node->changed = $time;

I was just wondering if this is by design?

Thanks!

Comments

naheemsays’s picture

Status: Active » Closed (duplicate)

That was done in #722688: Allow programmatic setting of node->changed I think - and that is still open, so setting this as duplicate.

(but yes, it was a deliberate change.)