Search Postgresql Archives

Re: Timezone information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 20, 2014 at 2:06 AM, John R Pierce <pierce@xxxxxxxxxxxx> 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...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux