title: How to use strptime to convert timestamp string with milliseconds to time object
body: <p>I need to use <code>strptime</code> to convert a timestamp string with milliseconds to a Time object.</p>
  
  <p>A work around is using <code>parse</code>:</p>
  
  <pre><code>t= Time.parse('29 Sep 2013 12:25:00.367')
  =&gt; 2013-09-29 12:25:00 -0400
  </code></pre>
  
  <p>But it is very important for my code to use <code>strptime</code>, because I want to be able to pass multiple types of format including: "HH:MM", "HH", etc. through the function.</p>
  
  <p>I can do it with nanoseconds like this:</p>
  
  <pre><code>Time.strptime("12:34:56:789434", "%H:%M:%S:%N")
  =&gt; 2016-03-16 12:34:56 +0100
  </code></pre>
  
  <p>I want something like this:</p>
  
  <pre><code>Time.strptime("12:34:56:789", "%H:%M:%S:%[insert magic letter that represent milliseconds]")
  </code></pre>
  
  <p>My thought is that there must be a way to do it with milliseconds as well.</p>
  
  <p>Is it possible and how?</p>