From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | timestamp with time zone |
Date: | 2007-12-13 05:12:42 |
Message-ID: | 20071213.141242.110976098.t-ishii@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2007-12-13 05:54:13 | Re: timestamp with time zone |
Previous Message | Tatsuo Ishii | 2007-12-13 05:10:45 | timestamp with time zone |