Hi Folks !
I'm currently playing with the eGroupware xml-rpc - and discovered, that
this shiny application send the DateTime in a slight other format
YYYY-MM-DDTZHH:MM:SS
The patch.txt extends the Parser ( in a non-destructive-way ).
Hope that helps.
Index:
/home/linux/workspace/ws-xmlrpc/common/src/main/java/org/apache/xmlrpc/util/XmlRpcDateTimeFormat.java
===================================================================
---
/home/linux/workspace/ws-xmlrpc/common/src/main/java/org/apache/xmlrpc/util/XmlRpcDateTimeFormat.java
(revision 429478)
+++
/home/linux/workspace/ws-xmlrpc/common/src/main/java/org/apache/xmlrpc/util/XmlRpcDateTimeFormat.java
(working copy)
@@ -74,7 +74,10 @@
return null;
}
year = Integer.parseInt(digits.toString());
-
+
+ if (offset < length && pString.charAt(offset) == '-') {
+ offset++;
+ }
offset = parseInt(pString, offset, digits, 2);
if (digits.length() != 2) {
pParsePosition.setErrorIndex(offset);
@@ -81,7 +84,10 @@
return null;
}
month = Integer.parseInt(digits.toString());
-
+
+ if (offset < length && pString.charAt(offset) == '-') {
+ offset++;
+ }
offset = parseInt(pString, offset, digits, 2);
if (digits.length() != 2) {
pParsePosition.setErrorIndex(offset);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]