title: Formatting milliseconds into hh:mm:ss - extraneous hours added
body: <p>I'm using momentJS to find the difference between two times and format to hh:mm:ss. <code>Ver: "moment": "~2.10.6"</code></p>
  
  <p>The problem I'm having is an extraneous 7 hours being added to a time whose difference is only 1 minute, 1 second.</p>
  
  <pre><code>var diff_ms = moment('2016-07-29 10:35:18').diff('2016-07-29 10:34:17');
  </code></pre>
  
  <blockquote>
    <p>61000</p>
  </blockquote>
  
  <pre><code>var diff = moment(diff_ms).format('hh mm ss')
  </code></pre>
  
  <blockquote>
    <p>"07 01 01"</p>
  </blockquote>
  
  <p><a href="https://stackoverflow.com/questions/22938300/convert-milliseconds-to-hours-and-minutes-using-momentjs">Convert milliseconds to hours and minutes using Momentjs</a> says to specify the time unit as milliseconds, <code>moment.duration(x, 'milliseconds');</code>, but since it's returning the correct minutes and seconds (<code>01 01</code>), it seems it's correctly defaulting to milliseconds. </p>
  
  <p>I can do this the "un-momentJS" way:</p>
  
  <pre><code>var a = moment.duration(61000, 'milliseconds');
  </code></pre>
  
  <blockquote>
    <p>a: n {_milliseconds: 61000, _days: 0, _months: 0, _data: Object,
    _locale: l}</p>
  </blockquote>
  
  <pre><code>var b = a.hours() + ':' + a.minutes() + ':' + a.seconds();
  </code></pre>
  
  <blockquote>
    <p>b: 0:1:1</p>
  </blockquote>
  
  <p>But don't have an easy way of formatting this output to hh:mm:ss using string concatenation like this.</p>