Skip to content
Snippets Groups Projects
Commit 5f5f8b97 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

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
Branches
Tags
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment