How to timestamp last block access to profile cck field I need to log when a user last accessed particular areas of my site (a content type and some views pages), to do this I have added a block using PHP filter with the below code. This block is only visible on the required pages so I was hoping it would mean when a user accesses these pages it updates the users profile with the timestamp.

global $user;
$uid = $user-&gt;uid;
$node = content_profile_load(profile,$uid);
$pid = $node-&gt;nid;
$node = node_load($pid);
$changeLastAccess = mktime();
$node-&gt;field_changes_last_access[0]['value'] = $changeLastAccess;
node_save($node);


The problem is this date always shows the CURRENT time, not the time when a user was last on one of the pages on which the block is active. I am totally stumped...

EDIT: 
This was working all along, i had created the wrong CCK field type of "Date" rather than "Datestamp", changed this over and it works fine.
The above works fine, however the cck field type needs to be a "Datestamp"