Thursday, April 06, 2006

Still about oracle time

Oracle time setup is complicated: You have following choices to retrieve timezone and time info:

select to_char(sysdate,'YYYY-MM-DD HH:MI') from dual;
select dbtimezone from dual;
select current_timestamp from dual;
select sessiontimezone from dual;
select systimestamp from dual;

One strange one I encountered today is while I am using the oracle advanced queue (AQ). There are columns named ENQ_TIME and TIME_MANAGER_INFO. Both are autogenerated fields. For ENQ_TIME, oracle use the timezone time (local time); for TIME_MANAGER_INFO, oracle use GMT time! Strange

No comments: