Re: Timezone information

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Timezone information
Дата
Msg-id 20140219215658.GB29726@crankycanuck.ca
обсуждение исходный текст
Ответ на Re: Timezone information  (Dev Kumkar <devdas.kumkar@gmail.com>)
Ответы Re: Timezone information  (Dev Kumkar <devdas.kumkar@gmail.com>)
Список pgsql-general
On Thu, Feb 20, 2014 at 03:22:15AM +0530, Dev Kumkar wrote:
>
> Hmm. Missed one observation here, created a test table with timestamp
> column of type 'default current_timestamp'.
> When the query is executed from JDBC then it stores OS specific local time
> into this column.

Probably the JDBC driver is setting its TimeZone.  Really, try it:

SET TimeZone="UTC";
SELECT now();

SET TimeZone="EST5EDT";
SELECT now();

and so on.  Try selecting from your table, too, and you will discover
that the time zone of the timestamps changes.  If you're used to
certain other RDBMSes, this mode of functioning will be unusual, but
that really is how it works.

Best regards,

A

--
Andrew Sullivan
ajs@crankycanuck.ca


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

Предыдущее
От: Dev Kumkar
Дата:
Сообщение: Re: Timezone information
Следующее
От: Dev Kumkar
Дата:
Сообщение: Re: UTF-8 collation on Windows?