title: How to get 2 digit hour and minutes from Rails time class
body: <p>I am looking at </p>
  
  <p><a href="http://corelib.rubyonrails.org/classes/Time.html#M000245" rel="noreferrer">http://corelib.rubyonrails.org/classes/Time.html#M000245</a></p>
  
  <p>how can I get two digit hour and minutes from a time object</p>
  
  <p>Lets say I do </p>
  
  <pre><code>t = Time.now
  
  t.hour // this returns 7 I want to get 07 instead of just 7
  </code></pre>
  
  <p>same for </p>
  
  <pre><code>t.min //  // this returns 3 I want to get 03 instead of just 3
  </code></pre>
  
  <p>Thanks</p>