*** pgsnap0611200-orig/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java Thu Nov 2 10:00:17 2000 --- pgsnap0611200/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java Tue Nov 7 11:11:12 2000 *************** *** 468,476 **** // This works, but it's commented out because Michael Stephenson's // solution is better still: //SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); ! ! // Michael Stephenson's solution: SimpleDateFormat df = null; if (s.length()>21 && s.indexOf('.') != -1) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSzzz"); } else if (s.length()>19 && s.indexOf('.') == -1) { --- 468,487 ---- // This works, but it's commented out because Michael Stephenson's // solution is better still: //SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); ! // Modification by Jan Thomae ! String sub = s.substring(s.length() - 3, s.length()-2); ! if (sub.equals("+") || sub.equals("-")) { ! s = s.substring(0, s.length()-3) + "GMT"+ s.substring(s.length()-3, s.length())+":00"; ! } ! // ------- ! // Michael Stephenson's solution: SimpleDateFormat df = null; + + // Modification by Jan Thomae + if (s.length()>27) { + df = new SimpleDateFormat("yyyy-MM-dd HH:mm:sszzzzzzzzz"); + } else + // ------- if (s.length()>21 && s.indexOf('.') != -1) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSzzz"); } else if (s.length()>19 && s.indexOf('.') == -1) { *************** *** 839,852 **** //if index<0, count from the end of the result set, but check //to be sure that it is not beyond the first index ! if (index<0) { if (index>=-rows.size()) internalIndex=rows.size()+index; else { beforeFirst(); return false; } ! } else { //must be the case that index>0, //find the correct place, assuming that //the index is not too large --- 850,863 ---- //if index<0, count from the end of the result set, but check //to be sure that it is not beyond the first index ! if (index<0) if (index>=-rows.size()) internalIndex=rows.size()+index; else { beforeFirst(); return false; } ! //must be the case that index>0, //find the correct place, assuming that //the index is not too large *************** *** 855,861 **** else { afterLast(); return false; - } } current_row=internalIndex; --- 866,871 ----