Timezone With Timestamp

Поиск
Список
Период
Сортировка
От Gavin Roy
Тема Timezone With Timestamp
Дата
Msg-id 3AB8C9F2-B47F-11D6-BC43-00039350FEEA@justsportsusa.com
обсуждение исходный текст
Ответы Re: Timezone With Timestamp  (Alvaro Herrera <alvherre@atentus.com>)
Список pgsql-general
I know I'm missing something somewhere but I am using the data type
timezone with timestamp and when I am retrieving the data while using
the to_char function to format the timestamp, when I include the
timezone ( to_char(t_timestamp, 'HH12:MM AM TZ') ) it is returning my
local timezone and not the timezone of the record that inserted it.

For example when the data is being inserted from east coast our system
does a:

SET TIMEZONE = 'America/New_York' ;

then INSERT INTO table VALUES ( now() );

(abbreviated for explanation)

Anyway what I want to return in one query is the time in/and the
timezone such as

10:15 AM EST
10:30 AM PST
11:25 PM CST
12:00 PM GMT

Can someone give me a pointer as to what direction to poke in, or is
this even possible?

TIA,

Gavin


В списке pgsql-general по дате отправления:

Предыдущее
От: Clinton Adams
Дата:
Сообщение: Re: DAO for PostGRE
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Timezone With Timestamp