aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>2001-05-22 14:46:46 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>2001-05-22 14:46:46 +0000
commit0b471cc338777b84f3510b124aeaa7de75572848 (patch)
tree4f00464c615a60f4897e14ba3fda3a980a825ad6 /src
parent041c752fce0c5958f4c923eb460891e416a136be (diff)
downloadpostgresql-REL7_1_2.tar.gz
postgresql-REL7_1_2.zip
Patch from Barry Lind to correctly decode time zones in timestamp results.REL7_1_2
Without patch, the time zone field is ignored and the returned time is not correct. Already applied to the development tree...
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
index 561614b33ab..4b988a3e4fa 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
@@ -499,13 +499,13 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
// could optimize this a tad to remove too many object creations...
SimpleDateFormat df = null;
- if (s.length()>23 && subsecond) {
+ if (sbuf.length()>23 && subsecond) {
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSzzzzzzzzz");
- } else if (s.length()>23 && !subsecond) {
+ } else if (sbuf.length()>23 && !subsecond) {
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:sszzzzzzzzz");
- } else if (s.length()>10 && subsecond) {
+ } else if (sbuf.length()>10 && subsecond) {
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
- } else if (s.length()>10 && !subsecond) {
+ } else if (sbuf.length()>10 && !subsecond) {
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
} else {
df = new SimpleDateFormat("yyyy-MM-dd");