title: Why is PHP date() adding +1 hour in diff calculation?
body: <p>I've got kind of a tricky question, I already searched every related question on Stackoverflow and neither solved my <em>conundrum</em>, although I think I'm running in circles, so here's the question:</p>
  
  <p>I've got this code:</p>
  
  <pre><code>$val = (strtotime('2010-03-22 10:05:00')-strtotime('2010-03-22 09:00:00'))
  </code></pre>
  
  <p>This returns correctly $val = 3900 (3600 seconds = 1 hour, 300 seconds = 5 mins)</p>
  
  <p>But doing this:</p>
  
  <pre><code>echo date("H:i",$val)."&lt;br&gt;";
  </code></pre>
  
  <p>returns 02:05</p>
  
  <p>even doing this:</p>
  
  <pre><code>echo date("H:i",3900)."&lt;br&gt;";
  </code></pre>
  
  <p>returns 02:05 (just to be naively sure)</p>
  
  <p>Doing this:</p>
  
  <pre><code>echo date("H:i eTO",3900)."&lt;br&gt;";
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>02:05 System/LocaltimeCET+0100
  </code></pre>
  
  <p>Which is correct, my timezone is CET and is +1.</p>
  
  <p>What's going on? Is date() correcting the timezone for some reason? Or am I doing anything wrong?</p>