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

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Is there away to output a time stamp in a specified time zone with the time zone indicator (e.g. EDT)
Дата
Msg-id jon88d$fsm$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на 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>)
Список 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 по дате отправления:

Предыдущее
От: Frank Lanitz
Дата:
Сообщение: Re: Variables inside plpythonu
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: Lock out PostgreSQL users for maintenance