diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
index 467476f833ce2f5b76644e1853cee7c3a32da379..aae8cf6ff26bd183d0542f9b6a301757ce5ad9b9 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
@@ -488,13 +488,13 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
 
     SimpleDateFormat df = null;
 
-    if (sbuf.length()>23 && subsecond) {
+    if (s.length()>23 && subsecond) {
       df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSzzzzzzzzz");
-    } else if (sbuf.length()>23 && !subsecond) {
+    } else if (s.length()>23 && !subsecond) {
       df = new SimpleDateFormat("yyyy-MM-dd HH:mm:sszzzzzzzzz");
-    } else if (sbuf.length()>10 && subsecond) {
+    } else if (s.length()>10 && subsecond) {
       df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
-    } else if (sbuf.length()>10 && !subsecond) {
+    } else if (s.length()>10 && !subsecond) {
       df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     } else {
       df = new SimpleDateFormat("yyyy-MM-dd");