2

The node created field is not the same time as when it was finally published (or I guess maybe promoted, instead of published).

I've loaded a node using node_load() in my module code, how can I access when this node was actually published?

4

The node object does not store the "publication date", install this module to create that field http://drupal.org/project/publication_date

Some details from the module's project page:

The Publication Date module adds a "Published on" date for each node, containing the date when it was first published.

Without this, the only dates available for nodes are their created date and changed date, but these are often insufficient to meet the needs of publishing workflows. Sorting nodes by their created date doesn't account for content which is held in draft form for a time while being readied for publication. Sorting nodes by their changed date fails to account for content needing minor corrections after being published.

The "Published on" date can be used in any templates, or views. Publication date also incudes integration with the Display Suite module and has entity wrapper support, so it can integrate with modules like Rules that use the Entity API module.

The "Published on" date can be edited through the node edit form, allowing a custom published date to be set. If a custom date is set prior to publication, it will be respected when the node is published. The publication date is also retained when a node is unpublished and then republished.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.