1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 05:02:26 -05:00

Fix for date/time issues prior to fetch(BODY) or fetch(BODY_SANE) is called.

This commit is contained in:
Matthew Brace 2008-12-25 01:08:34 +00:00
parent dc7a1a0532
commit 46d4619ffb

View File

@ -1296,7 +1296,7 @@ public class WebDavStore extends Store {
} }
} }
} }
@Override @Override
public Flag[] getPermanentFlags() throws MessagingException { public Flag[] getPermanentFlags() throws MessagingException {
return PERMANENT_FLAGS; return PERMANENT_FLAGS;
@ -1602,7 +1602,6 @@ public class WebDavStore extends Store {
} }
} }
/** /**
* Data set for handling all XML Parses * Data set for handling all XML Parses
*/ */
@ -1651,11 +1650,13 @@ public class WebDavStore extends Store {
} else if (tagName.equals("subject")) { } else if (tagName.equals("subject")) {
this.mEnvelope.addHeader("Subject", value); this.mEnvelope.addHeader("Subject", value);
} else if (tagName.equals("date")) { } else if (tagName.equals("date")) {
value = value.replaceAll("T", " "); /**
String[] valueBreak = value.split("\\."); * Exchange doesn't give us rfc822 dates like it claims. The date is in the format:
value = valueBreak[0]; * yyyy-MM-dd'T'HH:mm:ss.SSS<Single digit representation of timezone, so far, all instances are Z>
*/
value = value.substring(0, value.length() - 1);
DateFormat dfInput = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); DateFormat dfInput = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
DateFormat dfOutput = new SimpleDateFormat("EEE, d MMM yy HH:mm:ss Z"); DateFormat dfOutput = new SimpleDateFormat("EEE, d MMM yy HH:mm:ss Z");
String tempDate = ""; String tempDate = "";
@ -1681,7 +1682,7 @@ public class WebDavStore extends Store {
this.mCc = this.mCc + value; this.mCc = this.mCc + value;
} else if (tagName.equals("getcontentlength")) { } else if (tagName.equals("getcontentlength")) {
this.mEnvelope.addHeader("Content-Length", value); this.mEnvelope.addHeader("Content-Length", value);
} }
if (!this.mTempUid.equals("") && if (!this.mTempUid.equals("") &&