webdbDate.append(pad2(theDate.get(Calendar.MINUTE)));
webdbDate.append(":");
webdbDate.append(pad2(theDate.get(Calendar.SECOND)));
- //assumes you are an hour-multiple away from UTC....
+ //assumes you are an hour-multiple away from UTC....
int offset=(theDate.get(Calendar.ZONE_OFFSET)/(60*60*1000));
if (offset < 0){
webdbDate.append("-");
returnDate.append("Z");
}
else{
- //need to see what a newfoundland postgres
+ //need to see what a newfoundland postgres
//timestamp looks like before making this robust
returnDate.append(tzInfo);
returnDate.append(":00");
}
/**
- * Splits the provided CSV text into a list. stolen wholesale from
+ * Splits the provided CSV text into a list. stolen wholesale from
* from Jakarta Turbine StrinUtils.java -mh
*
* @param text The CSV list of values to split apart.
*/
public static String quote(String s)
{
- String s2 = quote(s, '\'');
+ //String s2 = quote(s, '\'');
+ //Quickhack ÊÊ Ê Ê Ê Ê Ê Ê
+ //Because of '?-Bug in Postgresql-JDBC-Driver
+ StringBuffer temp = new StringBuffer();
+ for(int i=0;i<s.length();i++){
+ if(s.charAt(i)=='\''){
+ temp.append("'");
+ } else {
+ temp.append(s.charAt(i));
+ }
+ }
+ String s2 = temp.toString();
+ //end Quickhack
+
s2 = quote(s2, '\"');
return s2;
}