Re: Is there away to output a time stamp in a specified time zone with the time zone indicator (e.g. EDT) - Mailing list pgsql-general

From Jasen Betts
Subject Re: Is there away to output a time stamp in a specified time zone with the time zone indicator (e.g. EDT)
Date
Msg-id jon88d$fsm$1@reversiblemaps.ath.cx
Whole thread Raw
In response to Is there away to output a time stamp in a specified time zone with the time zone indicator (e.g. EDT)  (Matrix Guy <matrixguy696@yahoo.com>)
List pgsql-general
On 2012-05-02, Matrix Guy <matrixguy696@yahoo.com> wrote:

>
> I'm referring to US time zones here.=A0 I'd like to output a time stamp field
> in a specified time zone.=A0 I'd also like to display the time zone
(e.g. EDT) at the end.=A0 Ideally,

trivially this is done by issuing set commands

set session timezone to 'america/new_york';
set session datestyle to 'sql,mdy';

select now();
 05/12/2012 22:54:22.693175 EDT

select now() - interval '3 month' ;
 02/12/2012 22:56:38.28168 EST

set session timezone to 'america/denver';
select now();
 05/12/2012 21:00:13.998272 MDT


--
⚂⚃ 100% natural

pgsql-general by date:

Previous
From: Frank Lanitz
Date:
Subject: Re: Variables inside plpythonu
Next
From: Jasen Betts
Date:
Subject: Re: Lock out PostgreSQL users for maintenance