_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › TimeZone

time zone name
select * from pg_timezone_names
where name like '%Seoul%'

--postgresql.conf timezone utc襦 誤 螻, れ timezone Asia/Seoul 
drop table utc_test;
create table utc_test(dt timestamptz);

--ル逢覯
insert into utc_test(dt) values
('2016-03-11 06:11:12.431928'::timestamp at time zone 'Asia/Seoul'), 
('2016-03-12 06:11:12.431928+09'::timestamptz),
('2016-03-12 06:11:12.431928'::timestamp + interval '-09:00');

--譟壱覦覯
select
    dt at time zone 'Asia/Seoul' 
,   dt    
from utc_test
where 1=1
and dt >= ('2016-03-11'::timestamp at time zone 'Asia/Seoul')
and dt <  ('2016-03-12'::timestamp at time zone 'Asia/Seoul');

--postgresql.conf timezone utc襦 誤  
--'2016-03-11 16:11:12.431928' Asia/Seoul time企朱
select
	'2016-03-11 16:11:12.431928'::timestamptz --> 覓語 豌企ゼ utc襦 語.
,	'2016-03-11 16:11:12.431928'::timestamp at time zone 'Asia/Seoul' --> utc 螳朱 覲.
,	'2016-03-11 16:11:12.431928' at time zone 'Asia/Seoul' --> 覓語伎 utc 螳朱 螳螻 Asia/Seoul 螳朱 覲.



--'2016-03-11 16:11:12.431928' --> Asia/Seoul time企朱..
select 
	dt --> 9螳 觜手 ロ 蟆: utc
,	dt at time zone 'Asia/Seoul'
from (select '2016-03-11 16:11:12.431928'::timestamp at time zone 'Asia/Seoul' dt) t
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

螳讌 螻 襷 蟆讌 螻 豐 蟆螻 螳.