Re: Timezone information

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Timezone information
Дата
Msg-id 20140219211932.GX29726@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 02:46:46AM +0530, Dev Kumkar wrote:
> Since the database is created on SRC-INDIA the timezone parameter gets set
> as "Asia/Calcutta", but when shipped locally then now() would return
> incorrect time as per target TGT-USA local time.
>

No, select now() would return the time in whatever timezone is set, or
the timezone that the server defaulted to if there's nothing set by
the client.  So in your installation, set up the server to use UTC by
default and, if you like, set the client's time zone according to
locale or whatever when the client connects.

The timestamps in the server are not actually "in" a time zone.
They're all stored as UTC, and the display is altered according to
what your time zone settings are at the time of query.

Best regards,

A

--
Andrew Sullivan
ajs@crankycanuck.ca


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

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