From: | Dev Kumkar <devdas(dot)kumkar(at)gmail(dot)com> |
---|---|
To: | John R Pierce <pierce(at)hogranch(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Timezone information |
Date: | 2014-02-19 20:54:53 |
Message-ID: | CALSLE1OUtU+N7sdG4ig1qrwYZg8B-S8oBRsPqox1A7TrCddHuA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Feb 20, 2014 at 2:06 AM, John R Pierce <pierce(at)hogranch(dot)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...
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2014-02-19 21:02:29 | Re: Timezone information |
Previous Message | Adrian Klaver | 2014-02-19 20:54:01 | Re: UTF-8 collation on Windows? |