Re: Inserting the wrong date

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Inserting the wrong date
Дата
Msg-id 43D7F89F.2070503@opencloud.com
обсуждение исходный текст
Ответ на Inserting the wrong date  (Lucas Sanabio <lsanabio@gmail.com>)
Список pgsql-jdbc
Lucas Sanabio wrote:
> Hi everyone! I'm having an problem when I try to insert data into a
> timestamp field, let me try to explain what is going in on.
>
> I developed my application at my local machine and at this machine
> everything is working as it should, but when I deployed the application
> into the production server, every time I save an timestamp it saves it
> one hour before. The method that is inserting the data is pasted below:

What is the actual value inserted?

I'd guess that your client and server timezone do not match, so that
(for example) 2006-01-12 12:00:00 in the client's default timezone is
2006-01-12 12:00:00 +0100; if the server timezone is +0200 then this
will be represented as 2006-01-12 13:00:00 +0200 (which is the same
instant in time).

If the actual value inserted is wrong, the first thing I would do is to
try a recent driver as I did a number of time-and-date-related fixes
relatively recently. What driver version are you currently using?

-O

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Socket read fails
Следующее
От: David Hustace
Дата:
Сообщение: Re: Socket read fails