I am trying to format a timestamp field using the %fieldname%__display delegate class, but the procedure is getting ignored. What am I missing?
function last_updated__display(&$record){
if ($record->val('last_updated') == NULL){
return "";
} else {
return date('Y-m-d H:i:s', strtotime($record->strval('last_updated')));
}
}
[last_updated]
widget:label = "Last Updated"
widget:type = static
visibility:list = hidden
visibility:browse = hidden
order = 13
`last_updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,