title: Parsing string timestamp with time zone in 3-digit format followed by 'Z'
body: <p>In the Hadoop infrastructure (Java-based) I am getting timestamps as string values in this format:</p>
  
  <pre><code>2015-10-01T04:22:38:208Z
  2015-10-01T04:23:35:471Z
  2015-10-01T04:24:33:422Z
  </code></pre>
  
  <p>I tried different patters following <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html" rel="nofollow">examples</a> for SimpleDateFormat Java class without any success.</p>
  
  <p>Replaced 'T' with ' ' and 'Z' with '', then</p>
  
  <pre><code>"yyyy-MM-dd HH:mm:ss:ZZZ"
  "yyyy-MM-dd HH:mm:ss:zzz"
  "yyyy-MM-dd HH:mm:ss:Z"
  "yyyy-MM-dd HH:mm:ss:z"
  </code></pre>
  
  <p>Without replacement,</p>
  
  <pre><code>"yyyy-MM-dd'T'HH:mm:ss:zzz'Z'"
  </code></pre>
  
  <p>In fact, this format is not listed among examples. What should I do with it?
  Maybe those 3 digits are milliseconds, and time is in UTC, like this: "yyyy-MM-dd'T'HH:mm:ss.SSSZ"? But it still should look like "2015-11-27T10:50:44.000-08:00" as standardized format ISO-8601.</p>
  
  <p>Maybe, this format is not parsed correctly in the first place?</p>
  
  <p>I use Ruby, Python, Pig, Hive to work with it (but not Java directly), so any example helps. Thanks!</p>