title: Illegal pattern character 'T' when parsing a date string to java.util.Date
body: <p>I have a date string and I want to parse it to normal date use the java Date API,the following is my code:</p>
  
  <pre><code>public static void main(String[] args) {
      String date="2010-10-02T12:23:23Z";
      String pattern="yyyy-MM-ddThh:mm:ssZ";
      SimpleDateFormat sdf=new SimpleDateFormat(pattern);
      try {
          Date d=sdf.parse(date);
          System.out.println(d.getYear());
      } catch (ParseException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>However I got an exception: <code>java.lang.IllegalArgumentException: Illegal pattern character 'T'</code></p>
  
  <p>So I wonder if I have to split the string and parse it manually?</p>
  
  <p>BTW, I have tried to add a single quote character on either side of the T:   </p>
  
  <pre><code>String pattern="yyyy-MM-dd'T'hh:mm:ssZ";
  </code></pre>
  
  <p>It also does not work.</p>