projects
/
org.ibex.mail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix date parsing bug in IMAP
[org.ibex.mail.git]
/
src
/
org
/
ibex
/
mail
/
IMAP.java
diff --git
a/src/org/ibex/mail/IMAP.java
b/src/org/ibex/mail/IMAP.java
index
8f5f3d0
..
288a312
100644
(file)
--- a/
src/org/ibex/mail/IMAP.java
+++ b/
src/org/ibex/mail/IMAP.java
@@
-706,7
+706,7
@@
public class IMAP {
}
public Date datetime() {
if (type != QUOTED) bad("Expected quoted datetime");
}
public Date datetime() {
if (type != QUOTED) bad("Expected quoted datetime");
- try { return new SimpleDateFormat("dd-MM-yyyy hh:mm:ss zzzz").parse(s.trim());
+ try { return new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss zzzz").parse(s.trim());
} catch (ParseException p) { throw new Server.Bad("invalid datetime format " + s + " : " + p); }
}
public String atom() {
} catch (ParseException p) { throw new Server.Bad("invalid datetime format " + s + " : " + p); }
}
public String atom() {
@@
-831,6
+831,12
@@
public class IMAP {
")";
}
")";
}
+ // FIXME: ugly
+ public static String qq(Stream stream) {
+ StringBuffer sb = new StringBuffer();
+ stream.transcribe(sb);
+ return sb.toString();
+ }
public static String qq(String s) {
StringBuffer ret = new StringBuffer();
ret.append('{');
public static String qq(String s) {
StringBuffer ret = new StringBuffer();
ret.append('{');