You could use the Timestamp extension, if creating new “reference” timestamps will not be a problem. From its website:
It does this by means of a database file .hgtimestamp, residing in the
repo’s root and thus being versioned.
Other than this, I don’t think it’s possible.
I’ve read a little about Timestamp hook, and it seems to be exactly what you need.