title: Convert a timestamp EEE, d MMM yyyy HH:mm:ss GMT format to yyyy-MM-dd'T'HH:mm:ss'Z' format?
body: <p>I want to convert the timestamp <code>Wed, 20 Feb 2013 11:41:23 GMT</code> to <code>2013-02-20T11:41:23Z</code> . How can I do this? I want to ISO-8601 in UTC format(2013-20-02T04:51:03Z).</p>
  
  <p>My code is below</p>
  
  <pre><code>Date date=new Date();
  SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
  String strDate = date.toString();
  Date dt = formatter.parse(strDate );
  System.out.println("Date " +dt);
  </code></pre>
  
  <p>Output is:</p>
  
  <pre><code>Exception in thread "main" java.text.ParseException: Unparseable date: "Wed Feb 20 03:50:03 PST 2013"
  </code></pre>