title: Converting epoch time with milliseconds to datetime
body: <p>I have used a ruby script to convert iso time stamp to epoch, the files that I am parsing has following time stamp structure: </p>
  
  <pre><code>2009-03-08T00:27:31.807
  </code></pre>
  
  <p>Since I want to keep milliseconds I used following ruby code to convert it to epoch time: </p>
  
  <pre><code>irb(main):010:0&gt; DateTime.parse('2009-03-08T00:27:31.807').strftime("%Q")
  =&gt; "1236472051807"
  </code></pre>
  
  <p>But In python I tried following: </p>
  
  <pre><code>import time 
  time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(1236472051807))
  </code></pre>
  
  <p>But I don't get the original time date time back, </p>
  
  <pre><code>&gt;&gt;&gt; time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(1236472051807))
  '41152-03-29 02:50:07'
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>I wonder is it related to how I am formatting? </p>