Get the timestamp of last modification of TYPO3 page, difference between tstamp and SYS_LASTCHANGED

What is the right way to get the date of last modification of a TYPO3 page (and its *tt_content*) ?

There are 2 fields in properties of table pages : tstamp and SYS_LASTCHANGED.

In this article SYS_LASTCHANGED are recommended. But what is the role of tstamp in this case ?

Which one should we use ?


tstamp is modification time of the page record itself. SYS_LASTCHANGED is the modification time of the page OR its content. It's updated once the page is rendered in the frontend, not right after the change in the backend. However, thanks to this it also includes changes of content records residing on a different page and inserted into the given page using "Insert Records" content elements.

Note: Tested in TYPO3 4.5 LTS and might not work in later versions.