title: Laravel 5 Time Difference
body: <p>I have an application which on sign in records in time and on sign out records out time.</p>
  
  <p>My table has IN_TIME &amp; OUT_TIME</p>
  
  <p><strong>Example of data within those columns:</strong></p>
  
  <p>IN_TIME = 16:06:46</p>
  
  <p>OUT_TIME = 16:08:07</p>
  
  <p>I have a controller which to my blade template file is showing all attedances for a given person, what I want to do is show the time difference between the two.</p>
  
  <p>See below my current code which currently shows 0</p>
  
  <pre><code>**Time onsite:** {{ date('G:i', strtotime($attrec-&gt;out_time)) - date('G:i', strtotime($attrec-&gt;in_time)) }}
  </code></pre>
  
  <p>Is there a reason why I can't get the right figure?</p>