title: Parse a String to Date in Java
body: <p>I'm trying to parse a string to a date, this is what I have:</p>
  
  <pre><code>SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss zZ (zzzz)");
  Date date = new Date();
  try {
      date = sdf.parse(time);
  } catch (ParseException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>the string to parse is this:</p>
  
  <pre><code>Sun Jul 15 2012 12:22:00 GMT+0300 (FLE Daylight Time)
  </code></pre>
  
  <p>I followed the <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html" rel="nofollow">http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html</a></p>
  
  <p>Pretty sure I've done everything by the book. But it is giving me <code>ParseException</code>.</p>
  
  <pre><code>java.text.ParseException: Unparseable date: 
  "Sun Jul 15 2012 12:22:00 GMT+0300 (FLE Daylight Time)"
  </code></pre>
  
  <p>What am I doing wrong?  Patterns I Have tried:</p>
  
  <pre><code>EEE MMM dd yyyy HH:mm:ss zzz
  EEE MMM dd yyyy HH:mm:ss zZ (zzzz)
  </code></pre>