Ensuring the right time in Apex

Problem


Time is wrong in Apex.

Example, using apex.oracle.com, whenever sysdate is referenced, the time is an hour out.

Solution


(1) Ensure that the timezone is correct in Apex



Edit application attributes

Set this on



(2) Ensure that you select in the right way.

Above report SQL shows correct and incorrect way of getting the time:

select to_char(sysdate,'DD-MON-YYYY HH24:MI') "sysdate", to_char(cURRENT_TIMESTAMP,'DD-MON-YYYY HH24:MI') "cURRENT_TIMESTAMP" from dual


Current_timestamp is correct.
Sysdate is not.



Acknowledgement




Comments