title: timestamp Problems PHP
body: <p>i have this code and i have problem in Datetime() if i get timestamp in my database he working fine but after go to another page and come back to this page code every time the counter come back to 1 seconde and starts counting again</p>
  
  <p>but when use the timestamp directly like this counter work fine </p>
  
  <pre><code>$then = new DateTime('2016-03-18 23:47:41' , new DateTimeZone('Europe/London'));
  </code></pre>
  
  <p>this code when get timestamp in database
  e_time column  give him timestamp type </p>
  
  <pre><code> &lt;?php
      $stmt = $DB_con-&gt;prepare("SELECT * FROM `post` WHERE `e_stauts`=1 AND `lockin`=1 ORDER BY `id` DESC");
      $stmt-&gt;execute();   
    }
      foreach ($stmt-&gt;fetchAll() as $row) {
      echo"".$row['e_title']." &lt;/br&gt;";
  
      $then = new DateTime(''.$row['e_time'].'' , new DateTimeZone('Europe/London'));
      $now = new DateTime();
      $delta = $now-&gt;diff($then);
  
      $quantities = array(
          'year' =&gt; $delta-&gt;y,
          'month' =&gt; $delta-&gt;m,
          'day' =&gt; $delta-&gt;d,
          'hour' =&gt; $delta-&gt;h,
          'minute' =&gt; $delta-&gt;i,
          'second' =&gt; $delta-&gt;s); 
  
      if($quantities['day'] != 0){
      echo "".$quantities['day']." Day   ".'&lt;/br&gt;';   
      }elseif($quantities['day'] == 0 &amp; $quantities['hour'] &gt; 0){
      echo "".$quantities['hour']." Hour  ".'&lt;/br&gt;';    
      }elseif($quantities['hour'] == 0 &amp; $quantities['minute'] &gt; 0){
      echo "".$quantities['minute']." Minute   ".'&lt;/br&gt;';    
      }elseif($quantities['minute'] == 0 &amp; $quantities['second'] &gt; 0){
      echo "".$quantities['second']." Seconde   ".'&lt;/br&gt;';    
      }
       }     
  </code></pre>