Re: [JDBC] Re: Re: [JDBC] Timestamp parameter gets sent as date

Поиск
Список
Период
Сортировка
От Vladimir Sitnikov
Тема Re: [JDBC] Re: Re: [JDBC] Timestamp parameter gets sent as date
Дата
Msg-id CAB=Je-HY1wjA2LhzGm3P9+E0-o7Q1YGWb+5+a=wY0NQa6zWAeQ@mail.gmail.com
обсуждение исходный текст
Ответ на [JDBC] Re: Re: [JDBC] Timestamp parameter gets sent as date  (Genya <genyap@online.ua>)
Список pgsql-jdbc
Genya>SOMETIMES shows parameters used GMT 

It might be related with "user.timezone" Java property.

I would either recommend using Java 8's java.time API (it has notion for timestamp+timezone) or use setTimestamp(.., Timestamp, Calendar).
There's PGTimestamp, however it is not much better than java.time.

In case of "setTimestamp(3, Timestamp)" the value that is sent to the DB depends on the Java's default time zone.

Would you please check that?

Vladimir

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

Предыдущее
От: Genya
Дата:
Сообщение: [JDBC] Re: Re: [JDBC] Timestamp parameter gets sent as date
Следующее
От: Genya
Дата:
Сообщение: [JDBC] Re: [JDBC] Timestamp parameter gets sent as date