title: Java SimpleDateFormat pattern for W3C XML dates with timezone
body: <p>I am trying to parse a <a href="http://www.w3c.org" rel="noreferrer">W3C</a> XML Schema date like the following</p>
  
  <pre><code>"2012-05-15T07:08:09+03:00"
  </code></pre>
  
  <p>which complies with the ISO 8601 version of the <a href="http://www.w3.org/TR/xmlschema-2/#dateTime" rel="noreferrer">W3C XML Schema dateTime</a> specification.</p>
  
  <p>In the above date, the timezone identifier is <code>"+03:00"</code>, but no <code>SimpleDateFormat</code> pattern apparently exists to represent it.</p>
  
  <p>If the timezone were <code>"+0300"</code>, then <code>Z</code> (uppercase) would be applicable and the <code>SimpleDateFormat</code> pattern would be</p>
  
  <pre><code>yyyy-MM-dd'T'HH:mm:ssZ
  </code></pre>
  
  <p>Similarly, if the timezone were <code>"GMT+03:00"</code>, then <code>z</code> (lowercase) would be applicable and the <code>SimpleDateFormat</code> pattern would be</p>
  
  <pre><code>yyyy-MM-dd'T'HH:mm:ssz
  </code></pre>
  
  <p>(uppercase <code>'Z'</code> also works, by the way).</p>
  
  <p>So, is there a <code>SimpleDateFormat</code> pattern or workaround to represent the above date without preprocessing of the date string?</p>