From 5f5f8b97e2242255de436a2247b7face91a23c77 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 4 Jul 2001 15:08:32 +0000 Subject: [PATCH] This patch moves the setting of the timezone on the SimpleDateFormat object inside the initialization section instead of doing it everytime the setTimestamp method is called. Thanks to Dave Harkness for this suggestion. Barry Lind --- src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java b/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java index 69898cc3c9..1936845a92 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java @@ -369,9 +369,9 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta SimpleDateFormat df = (SimpleDateFormat) tl_tsdf.get(); if(df==null) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + df.setTimeZone(TimeZone.getTimeZone("GMT")); tl_tsdf.set(df); } - df.setTimeZone(TimeZone.getTimeZone("GMT")); // Use the shared StringBuffer synchronized(sbuf) { -- 2.40.0