title: Get formated time for a video duration in php
body: <p>This should be easy...</p>
  
  <p>I have a duration in seconds,
  I want to output it in hours:minutes:seconds format</p>
  
  <p>When I try...</p>
  
  <pre><code>// video duration is 1560 seconds
  
  &lt;?=date("h:i:s",$video-&gt;duration)?&gt;
  </code></pre>
  
  <p>...it outputs 07:26:00 instead of 00:26:00. So I figure it's a time zone issue.</p>
  
  <p>At the beginning of my application I set the timezone like this</p>
  
  <pre><code>date_default_timezone_set('America/Montreal');
  </code></pre>
  
  <p>Now I guess I would get my normal value if I change the timezone to GMT but I don't want to do that each time I want a simple duration (and re-set the timezone to America/Montreal)</p>
  
  <p>What are my options?</p>