Is there a way to add a timestamp to messages print from drupal_set_message()? Sometimes when I am editing I may accidentally edit the same page in different tabs, or I might forget  whether I have updated the page earlier or not. I use a Save and Edit button when saving and when I save I want to know when I last saved based on the notice in at the top of the page, where I normally see a message like the following.


  


There is some sample code for a module that changes the message handling - https://atendesigngroup.com/blog/drupal-7-drupal-8-customize-or-remove-node-creation-message. How could I change it just to add a timestamp to the message?
The problem is that at the point where these hooks are being used you have SESSION and FORM available and what you're asking for is a NODE attribute.

This can be done, simply loading the given NODE under the right conditions... but one should recognize doing this does have broader impact as these hooks are called fairly frequently.

How node_load is done is accomplished very differently in D7 and D8, not sure which one you're using from the question.  Lots of answers out there how to render fields from a node.  One more tip; your D7 install should have entity - the future proof method of getting node values is probably entity_load as nodes are entities in late D7 and all of D8...