Search Postgresql Archives

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

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

 



On 2012-05-02, Matrix Guy <matrixguy696@xxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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