Re: How to get the time zone offset

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: "Cezariusz Marek" <cezariusz(dot)marek(at)comarch(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to get the time zone offset
Date: 2011-12-30 16:57:21
Message-ID: 201112300857.22118.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, December 30, 2011 8:19:51 am Cezariusz Marek wrote:

>
> Is the timestamp::text format always the same, regardless of the current
> locale and language settings?

Now I have an answer. It can be changed via the DateStyle setting in postgresql.conf

http://www.postgresql.org/docs/9.1/interactive/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORMAT

So for my previous setting of (iso,mdy) I got:

test(5432)postgres=#select clock_timestamp()::text;
clock_timestamp
-------------------------------
2011-12-30 08:56:39.019038-08

Changing the setting to (sql,mdy) resulted in:

test(5432)postgres=#select clock_timestamp()::text;
clock_timestamp
--------------------------------
12/30/2011 08:55:48.554618 PST

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-12-30 16:59:26 Re: duplicate key errors when restoring 8.4.0 database dump into 9.1.2
Previous Message Culley Harrelson 2011-12-30 16:51:17 Re: duplicate key errors when restoring 8.4.0 database dump into 9.1.2