Some migrated content needs the "updated" timestamp set to the original timestamp, instead of the time the node was saved duration migration.
Setting the "changed" field in the database appears to have no affect for the node updated time?
Here's a sample query:
update node_field_data set changed = 1535805325 where nid = 2148716;
Query OK, 1 row affected (0.01 sec)
...
select nid,changed,from_unixtime(changed) from node_field_data where nid = 2148716;
+---------+------------+------------------------+
| nid | changed | from_unixtime(changed) |
+---------+------------+------------------------+
| 2148716 | 1535805325 | 2018-09-01 12:35:25 |
+---------+------------+------------------------+
1 row in set (0.02 sec)
When loading the node, the original changed
timestamp is returned:
[changed] => Array
(
[x-default] => 1532090833
)
I've tried clearing all caches, including clearing the cache tag and fully restarting the cache services (redis+varnish), but to no avail, the previous changed timestamp is always returned!
Any suggestions on how to set the updated/changed timestamp for this case?
$node->setChangedTime(1535805325)->save();