title: How to convert seconds to HH:mm:ss in moment.js
body: <p>How can I convert seconds to <code>HH:mm:ss</code>?</p>
  
  <p>At the moment I am using the function below</p>
  
  <pre><code>render: function (data){
       return new Date(data*1000).toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");;
  }
  </code></pre>
  
  <p>This works on chrome but in firefox for 12 seconds I get <code>01:00:12</code>
  I would like to use moment.js for cross browser compatibility </p>
  
  <p>I tried this but does not work</p>
  
  <pre><code>render: function (data){
           return moment(data).format('HH:mm:ss');
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I managed to find a solution <strong>without</strong> moment.js which is as follow</p>
  
  <pre><code>return (new Date(data * 1000)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0];
  </code></pre>
  
  <p>Still curious on how I can do it in moment.js</p>