Re: Timezone information

Поиск
Список
Период
Сортировка
От Dev Kumkar
Тема Re: Timezone information
Дата
Msg-id CALSLE1OUtU+N7sdG4ig1qrwYZg8B-S8oBRsPqox1A7TrCddHuA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Timezone information  (John R Pierce <pierce@hogranch.com>)
Ответы Re: Timezone information  (Andrew Sullivan <ajs@crankycanuck.ca>)
Список pgsql-general
On Thu, Feb 20, 2014 at 2:06 AM, John R Pierce <pierce@hogranch.com> wrote:
postgres handles timezones on a per client connection basis.  the server itself doesn't really care what timezone it is running in. 'timestamp with time zone' data is internally stored in the equivalent of UTC, and converted to/from the current client timezone on the fly (unless another timezone is explicitly stated in the query).

Ok but am confused then, as if no timezone parameter is defined in postgreSQL.conf file then yes UTC time is returned. "Select now()"
but if timezone parameter is set then "Select now()" returns date time as per timezone.

Again one question which am still looking answer is, in case of install from postgreSQL installer how the timezone parameter in postgreSQL.conf is set correctly to match with Operating system timezone.

Also note that, I can write a perl function to get the timezone on both windows and linux then map them to the pg_timezone_names table to get actual names in format "Asia/Calcutta" and set this as timezone parameter in postgreSQL.conf to workaround things.

Regards...

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

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