title: Parsing Date/Time in ruby
body: <p>I'm trying to parse a date with ruby so I tried the code below:</p>
  
  <pre><code>str = "Mon Jul 02 22:19:00 UTC 2012"
  puts DateTime.strptime(str, "%a %b %d H%:M%:S% UTC %Y")
  </code></pre>
  
  <p>But I'm getting this error message:</p>
  
  <pre><code>/usr/lib/ruby/1.8/date.rb:1576:in `new_by_frags': invalid date (ArgumentError)
          from /usr/lib/ruby/1.8/date.rb:1601:in `strptime'
          from get-bid.rb:38
  </code></pre>
  
  <p>When I remove the time from the string and <code>H%:M%:S%</code>, parsing works just fine. Did I misuse <code>strptime</code>?</p>