mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03: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:
@ -369,9 +369,9 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
|||||||
SimpleDateFormat df = (SimpleDateFormat) tl_tsdf.get();
|
SimpleDateFormat df = (SimpleDateFormat) tl_tsdf.get();
|
||||||
if(df==null) {
|
if(df==null) {
|
||||||
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
df.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||||
tl_tsdf.set(df);
|
tl_tsdf.set(df);
|
||||||
}
|
}
|
||||||
df.setTimeZone(TimeZone.getTimeZone("GMT"));
|
|
||||||
|
|
||||||
// Use the shared StringBuffer
|
// Use the shared StringBuffer
|
||||||
synchronized(sbuf) {
|
synchronized(sbuf) {
|
||||||
|
Reference in New Issue
Block a user