timestamp with time zone

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема timestamp with time zone
Дата
Msg-id 20071213.141242.110976098.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответы Re: timestamp with time zone  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
Hi,

Can someone enlighten me?

I know that I can insert date/time data along with time zone info into
the timestamp with time zone data type. My question is, can I extract
the *original* time zone info afterward? I seems impossible.

May be I should use date + time with time zone to preserve the time
zone info?

It seems the time with time zone data type can do this.

test=# create table t2(t time with time zone);
CREATE TABLE
test=#
test=# insert into t2 values('12:34:56 +0400');
INSERT 0 1
test=# select * from t2;
      t
-------------
 12:34:56+04
(1 row)

test=# select t at time zone 'jst' from t2;
  timezone
-------------
 17:34:56+09
(1 row)

test=# select t::time from t2;
    t
----------
 12:34:56
(1 row)
--
Tatsuo Ishii
SRA OSS, Inc. Japan

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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: timestamp with time zone
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: timestamp with time zone