Re: Timezone information - Mailing list pgsql-general

From Dev Kumkar
Subject Re: Timezone information
Date
Msg-id CALSLE1OUtU+N7sdG4ig1qrwYZg8B-S8oBRsPqox1A7TrCddHuA@mail.gmail.com
Whole thread Raw
In response to Re: Timezone information  (John R Pierce <pierce@hogranch.com>)
Responses Re: Timezone information  (Andrew Sullivan <ajs@crankycanuck.ca>)
List 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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: UTF-8 collation on Windows?
Next
From: Andrew Sullivan
Date:
Subject: Re: Timezone information