Editing the post time displayed for comments in Drupal 7 I need to display the post time of comments for a particular content type. I want these post times of comments to be in the "time ago" format.

Example: 1 minute ago

How can I do this in Drupal 7?
There is a native function in Drupal to format date intervals, it is called format_interval.

Usage example:

 // Date since forum post was created
 format_interval(REQUEST_TIME - $variables['topic']-&gt;created) 


Hope this helps, happy coding!

PS: See the answer I gave on your stackexchange post for the longer custom version you can also use.