-1
除了获得会话时区偏移量和数据库时区偏移量之外,Oracle数据库中还有其他的使用/作用SESSIONTIMEZONE
和DBTIMEZONE
。oracle中的SESSIONTIMEZONE和DBTIMEZONE有什么用途
我想知道的是,在从数据库插入/检索日期方面改变SESSIONTIMEZONE
和DBTIMEZONE
值的含义是什么。
除了获得会话时区偏移量和数据库时区偏移量之外,Oracle数据库中还有其他的使用/作用SESSIONTIMEZONE
和DBTIMEZONE
。oracle中的SESSIONTIMEZONE和DBTIMEZONE有什么用途
我想知道的是,在从数据库插入/检索日期方面改变SESSIONTIMEZONE
和DBTIMEZONE
值的含义是什么。
会话和数据库时区用于这些功能。
- systimestamp
dbtimezone中的时间戳记。
- current_timestamp
sessiontimezone中的时间戳。
而且可能在许多其他地方。我确信这种改变会影响dbms_scheduler。
甲骨文也从没有日期时间时区隐式转换过程中使用会话时区以timestamp with time zone
declare
with_dbtimezone TIMESTAMP WITH TIME ZONE := systimestamp; --dbtimezone
with_sesione_timezone TIMESTAMP WITH TIME ZONE := current_timestamp; --sesione_timezone
no_time_zone TIMESTAMP := with_dbtimezone; -- remmove timezone from ;
implicitit_converiosn TIMESTAMP WITH TIME ZONE := no_time_zone;
begin
dbms_output.put_line(to_char(with_dbtimezone,'YYYY-MM-DD hh24:mi:ss TZR'));
dbms_output.put_line(to_char(with_sesione_timezone,'YYYY-MM-DD hh24:mi:ss TZR'));
dbms_output.put_line(to_char(no_time_zone,'YYYY-MM-DD hh24:mi:ss TZR'));
dbms_output.put_line(to_char(implicitit_converiosn,'YYYY-MM-DD hh24:mi:ss TZR'));
end;
你已经看过的文件 - 例如[这里](https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch4datetime.htm#i1006705)和[这里](https://docs.oracle.com/cd/E11882_01/server 0.112/e10729/ch4datetime.htm#i1006728)? –