title: Get the time of published post in wordpress
body: <p>I have a blog in my site. In blog listing, I want to show date and time. I get the published post date with <code>the_time()</code>. But the getting time is a tricky part.</p>
  
  <p>I don't want to show posted time e.g. <code>1:30 PM</code></p>
  
  <p>I want to show the time duration of a post ... I mean like this </p>
  
  <p><code>53 minutes ago</code>
  or
  <code>4 hours ago</code>
  or 
  <code>2 days ago</code>
  or
  <code>5 months ago</code>
  or
  <code>1 year ago</code></p>
  
  <p>I first try this code <code>get_post_time('U', $post-&gt;ID)</code> or <code>get_post_time('U', true)</code> but it gives me the time stamp, Like this <code>1486128075</code></p>
  
  <p>And also try this <code>get_the_time()</code> but it gives me <code>1:00 PM</code></p>
  
  <p>Hope you understand my question</p>