mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
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:
parent
314207881b
commit
5f5f8b97e2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user