title: joda-time can't read Parse dateTime string
body: <p>I'm having an issue with joda-time formatting a date time string that Parse (parse.com) has stored in an sqlite table.</p>
  
  <p>Sqlite creation string:   <strong>"createdDate date time"</strong></p>
  
  <p>Storing parse date into table: <strong>"insert... parseObject.getCreatedAt()"</strong></p>
  
  <p>If i then use a SQLite browser to inspect the table, I see the date stored like this:</p>
  
  <blockquote>
    <p>Sat Jun 15 15:44:52 PDT 2013</p>
  </blockquote>
  
  <p>So going along with that, I wrote the following to convert it back into a DateTime object to give to parse as part of a query to get items that are newer than the last inserted in my table:</p>
  
  <pre><code> DateTimeFormatter format = DatetimeFormat.forPattern("yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSS'Z'");
   DateTime dt = formatter.parseDateTime(datahelper.getLastInsertDate(..));
  </code></pre>
  
  <p>The formatter is this way, because in Parse's databrowser, I can see dateTimes being stored like this:</p>
  
  <blockquote>
    <p>2013-06-24T08:11:45.280Z</p>
  </blockquote>
  
  <p>I get an ANR though, so I tried using the following formatter:</p>
  
  <pre><code>DateTimeFormatter format = DatetimeFormat.forPattern("EEE' 'MMM' 'dd' 'HH':'mm':'ss 'z'' 'YYYY");
  DateTime dt = formatter.parseDateTime(datahelper.getLastInsertDate(..));
  </code></pre>
  
  <p>and I still get an ANR.   The trace in eclipse shows the following:</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: invalid format: "Tue Jun 25 00:13:29 PDT 2013"
        at org.joda.time.format.DateTimeFormatter.parseDateTime"</p>
  </blockquote>
  
  <p>The second ANR trace shows: </p>
  
  <blockquote>
    <p>Invalid format: "Tue Jun 25 00:13:29 PDT 2013" is malformed at "PDT
    2013"</p>
  </blockquote>
  
  <p>I've tried getting around that, as joda time does not parse "z" to PDT/PST, so I've put 'PDT' in my formatter to hopefully get it to work, but nothing seems to work.</p>
  
  <p>Any ideas?</p>
  
  <p>Edit 1:  Using the accepted answer, I have a timezone formatting issue)</p>
  
  <pre><code>DateFormat originalFormat = new SimpleDateFormat("EEE MMM DDD HH:mm:ss z yyyy");
  Date originaldate = originalFormat.parse(datahelper.getLastInsertdate);
  Log.i("converted date: ", String.valueOf(originalDate);
  Log.i("a real date: ", "String.valueOf(new Date(new Date().getTime)));
  </code></pre>
  
  <p>I get two outputs:</p>
  
  <blockquote>
    <p>Fri Jan 25 15:14:11 PST 2013</p>
    
    <p>Tue Jun 25 17:11:44 PDT 2013</p>
  </blockquote>
  
  <p>why does the converted date show PST, and a standard Date shows PDT?</p>