title: Timestamp older than current time if else statement
body: <p>Im testing an online/offline function with timestamp from the database against DateTime NOW.</p>
  
  <p>But I cant figure out how to set interval time on lets say 5 minutes.
  If the user has not done anything in 5 minutes, appear offline.</p>
  
  <p>DateTime NOW will always be bigger than Database time.
  Any ideas on how to set the interval time on the statement ?</p>
  
  <p>This is what i have so far,</p>
  
  <pre><code>// $user_info['activity'] 2013-04-27 19:27:39 //
  
  $dateTime = new DateTime("now", new DateTimeZone('Europe/Warsaw'));
  if($user_info['activity']&gt;$dateTime){
  echo 'user Online';
  }else{
  echo 'user inactive';
  }
  </code></pre>