Index: org/postgresql/jdbc1/ResultSet.java =================================================================== RCS file: /projects/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java,v retrieving revision 1.29 diff -c -r1.29 ResultSet.java *** org/postgresql/jdbc1/ResultSet.java 2002/01/05 22:26:22 1.29 --- org/postgresql/jdbc1/ResultSet.java 2002/01/17 13:53:16 *************** *** 514,520 **** StringBuffer sbuf = new StringBuffer(s); SimpleDateFormat df = null; ! if (s.length() > 19) { // The len of the ISO string to the second value is 19 chars. If // greater then 19, there should be tz info and perhaps fractional --- 514,522 ---- StringBuffer sbuf = new StringBuffer(s); SimpleDateFormat df = null; ! int slen = s.length(); ! ! if (slen > 19) { // The len of the ISO string to the second value is 19 chars. If // greater then 19, there should be tz info and perhaps fractional *************** *** 534,540 **** if (i < 24) sbuf.append(c); c = s.charAt(i++); ! } while (Character.isDigit(c)); // If there wasn't at least 3 digits we should add some zeros // to make up the 3 digits we tell java to expect. --- 536,542 ---- if (i < 24) sbuf.append(c); c = s.charAt(i++); ! } while (i < slen && Character.isDigit(c)); // If there wasn't at least 3 digits we should add some zeros // to make up the 3 digits we tell java to expect. *************** *** 547,567 **** sbuf.append(".000"); } ! // prepend the GMT part and then add the remaining bit of ! // the string. ! sbuf.append(" GMT"); ! sbuf.append(c); ! sbuf.append(s.substring(i, s.length())); ! ! // Lastly, if the tz part doesn't specify the :MM part then ! // we add ":00" for java. ! if (s.length() - i < 5) ! sbuf.append(":00"); ! // we'll use this dateformat string to parse the result. ! df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z"); } ! else if (s.length() == 19) { // No tz or fractional second info. // I'm not sure if it is --- 549,576 ---- sbuf.append(".000"); } ! if (i < slen) ! { ! // prepend the GMT part and then add the remaining bit of ! // the string. ! sbuf.append(" GMT"); ! sbuf.append(c); ! sbuf.append(s.substring(i, slen)); ! ! // Lastly, if the tz part doesn't specify the :MM part then ! // we add ":00" for java. ! if (slen - i < 5) ! sbuf.append(":00"); ! // we'll use this dateformat string to parse the result. ! df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z"); ! } ! else ! { ! df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); ! } } ! else if (slen == 19) { // No tz or fractional second info. // I'm not sure if it is