Commit 5f5f8b97 authored by Bruce Momjian's avatar Bruce Momjian

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
parent 31420788
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment