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

@ -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 = "";