In drupal, I enabled Date module and added Date (Unix timestamp) to a content type, my question is instead of display the date how do I display the remaining time?
Highly appreciate your help!
Try using format_interval() function.
You can put the following code in your theme's template.php file:
function [YOUR_THEME]_ago($timestamp)
{
$ago = format_interval((time() - $timestamp) , 2) . t(' ago');
return $ago;
}
Hope this helps... Muhammad.