Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5f5f8b9

Browse files
committed
This patch moves the setting of the timezone on the SimpleDateFormat
object inside the initialization section instead of doing it everytimethe setTimestamp method is called. Thanks to Dave Harkness for thissuggestion.Barry Lind
1 parent3142078 commit5f5f8b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
369369
SimpleDateFormatdf = (SimpleDateFormat)tl_tsdf.get();
370370
if(df==null) {
371371
df =newSimpleDateFormat("yyyy-MM-dd HH:mm:ss");
372+
df.setTimeZone(TimeZone.getTimeZone("GMT"));
372373
tl_tsdf.set(df);
373374
}
374-
df.setTimeZone(TimeZone.getTimeZone("GMT"));
375375

376376
// Use the shared StringBuffer
377377
synchronized(sbuf) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp