Patch to set timezone once instead of every call

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Patch to set timezone once instead of every call
Дата
Msg-id 3B3E6DE9.4020404@xythos.com
обсуждение исходный текст
Ответы Re: [JDBC] Patch to set timezone once instead of every call  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [JDBC] Patch to set timezone once instead of every call  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
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.

thanks,
--Barry

*** ./interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java.orig    Sat Jun 30 17:19:36 2001
--- ./interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java    Sat Jun 30 17:20:47 2001
***************
*** 369,377 ****
            SimpleDateFormat df = (SimpleDateFormat) tl_tsdf.get();
            if(df==null) {
              df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
              tl_tsdf.set(df);
            }
-           df.setTimeZone(TimeZone.getTimeZone("GMT"));

            // Use the shared StringBuffer
            synchronized(sbuf) {
--- 369,377 ----
            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);
            }

            // Use the shared StringBuffer
            synchronized(sbuf) {

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Re: [JDBC] High Memory Usage Patch -- Disregard my last message
Следующее
От: Barry Lind
Дата:
Сообщение: Patch to remove connection hook and JDK 1.3 dependencies