oracle 时区处理

select systimestamp, systimestamp at time zone '08:00' sessiontimezone from dual;

 select systimestamp,
       sys_extract_utc(systimestamp) utc,
       (to_timestamp_tz(to_char(systimestamp)) at time zone '00:00') manually_utc
  from dual;

 select from_tz(to_timestamp('20200521','YYYYMMDD'), 'America/Sao_Paulo') from dual;
 
 select from_tz(to_timestamp('2020/05/21 16:00:00','yyyy/mm/dd HH24:Mi:ss'),'+08:00') at time zone '-07:00' tm from dual;
 
 SELECT TO_TIMESTAMP_TZ ('21-may-20 16:10:10.123000', 'DD-Mon-RR HH24:MI:SS.FF') FROM DUAL;

 

你可能感兴趣的:(oracle)