【发布时间】:2015-06-11 14:58:56
【问题描述】:
我有一个以May 29 14:12:56 PDT 2015 格式存储为varchar2 的时间戳。我想把它转换成timestamp with time zone 数据类型。
如果我使用,
with x(dt_string) as (
select 'May 29 14:12:56 PDT 2015' from dual
)
select dt_string,
to_timestamp_tz(dt_string,'Mon dd hh24:mi:ss TZD YYYY') dt_ts
from x;
它给了我,
DT_STRING DT_TS
------------------------ ----------------------------------------
May 29 14:12:56 PDT 2015 29-MAY-15 02.12.56.000000000 PM +00:00
时区不正确。
TZD 值是带有夏令时信息的缩写时区字符串。它必须与 TZR 中指定的区域相对应。
这是否意味着abbreviated time zone string 应该有Time zone region 才能执行正确的转换?但是,拥有Time zone region 将使
abbreviated time zone string 冗余。不是吗?
我该如何处理?
【问题讨论】: