title: How to get hh:mm:ss from date object?
body: <p>How can I get this hh:mm:ss from date object?</p>
  
  <pre><code>var d = new Date(); // for now
  datetext = d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();
  </code></pre>
  
  <p>I get this result below sometimes,</p>
  
  <pre><code>12:10:1
  </code></pre>
  
  <p>which should be </p>
  
  <pre><code>12:10:01
  </code></pre>
  
  <p>I assume this happens to the hour and minute as well.</p>
  
  <p>So I am after this </p>
  
  <pre><code>01:01:01
  </code></pre>
  
  <p>Not this 1:1:1</p>