Re: pgdev.305.jdbc3, postgresql 8.0 and timestamps

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: pgdev.305.jdbc3, postgresql 8.0 and timestamps
Дата
Msg-id Pine.BSO.4.56.0408182244370.29626@leary.csoft.net
обсуждение исходный текст
Ответ на pgdev.305.jdbc3, postgresql 8.0 and timestamps  (Mario Ivankovits <imario@apache.org>)
Список pgsql-jdbc

On Wed, 18 Aug 2004, Mario Ivankovits wrote:

> Hello !
>
> I have a problem with the pgdev.305.jdbc3 driver and timestamps.
>
> I created a simple table where the primary key is a timestamp field.
> Then i inserted a row with the timestamp: 2004-08-17 21:00:00
> If i select the record using this date 2004-08-17 21:00:00 it will
> return the correct row, but a getTimestamp on this row will
> report 2004-08-17 19:00:00 instead of 2004-08-17 21:00:00.
> The timestamp in the database shows 2004-08-17 19:00:00.
> So there is a timezone discrepance between the data sent to the database
> and the data read back from it.
>

I have not been able to duplicate this problem.  What server version are
you running this against?  Is there something else unusual in your setup?
Does the java client believe it is in a different timezone than the
database?  Compare SELECT now() in psql versus
System.out.println(new java.text.SimpleDateFormat("Z").format(new Date()))

Kris Jurka


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

Предыдущее
От: Lane Sharman
Дата:
Сообщение: Re: Advice
Следующее
От: jpicard@free.fr
Дата:
Сообщение: Error on connection