How to get the time zone offset - Mailing list pgsql-general

From Cezariusz Marek
Subject How to get the time zone offset
Date
Msg-id AF944E823EDD4312A870B50C02817625@co382.comarch.net
Whole thread Raw
List pgsql-general
I need to convert timestamp to a format with a time zone offset, like this:

select clock_timestamp()::text;

which returns:

"2011-12-30 11:59:06.538+01"

What is the default format for timestamp::text conversion? I've tried this:

select to_char(clock_timestamp(), 'YYYY-MM-DD HH24:MI:SSTZ');

But it gives me "CET" instead of "+01":

"2011-12-30 11:59:06CET"

--
____________________________________________________________________
Cezariusz Marek                   mob: +48 608 646 494
http://www.comarch.com/           tel: +48 33 815 0734
____________________________________________________________________



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: duplicate key errors when restoring 8.4.0 database dump into 9.1.2
Next
From: gato pardo
Date:
Subject: pgoledb transaction error