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
This commit is contained in:
Bruce Momjian 2001-07-04 15:08:32 +00:00
parent 314207881b
commit 5f5f8b97e2

View File

@ -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) {