title: Python 3 Convert ISO 8601 to milliseconds
body: <p>I'm receiving an ISO 8601 format from an API GET request ("2020-02-25T00:02:43.000Z"). I'm trying to convert it to milliseconds, because that format is required in the payload of the API POST call. I've been successful running the code from a Linux system, but I get <code>ValueError: Invalid format string</code> from Windows.</p>
  
  <p><strong>From Linux:</strong></p>
  
  <pre><code>import dateutil.parser
  
  time = "2020-02-25T00:02:43.000Z"
  parsed_time = dateutil.parser.parse(time)
  t_in_millisec = parsed_time.strftime('%s%f')
  t_in_millisec[:-3]
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>'1582588963000'
  </code></pre>
  
  <p><strong>From Windows:</strong></p>
  
  <pre><code>import dateutil.parser
  
        1 time = "2020-02-25T00:02:43.000Z"
        2 parsed_time = dateutil.parser.parse(time)
  ----&gt; 3 t_in_millisec = parsed_time.strftime('%s%f')
  
  ValueError: Invalid format string
  </code></pre>
  
  <p><strong>Is there a way around this?</strong></p>