I imported thousands of nodes into a new website, however doing so automatically changed the publishing date to the current one hence all of my views that are sorted in descending order are now displaying very old stories.

Does anyone know how I can change the dates of multiple nodes in one go?

Thanks!
Jane

Comments

Drave Robber’s picture

Changing 'node created' timestamps might be possible with VBO (not 100% sure though, VBO is a huge thing).
Changing 'node changed' timestamps will necessarily require a "hackish" custom code, as node_save() always sets it to the current time.

bojanz’s picture

Yup, use VBO, select your nodes, execute action "Execute arbitrary PHP script", in the text box do something like $object->created = $new_value; node_save($object);
And you're done.

MakeOnlineShop’s picture

Hello,

I couldn't manage to do it, can you explain more ?

Thank you.