Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Converting date and time stored in UTC to local time

HawkerHunterSep 18 2021

Hello friends,
I am using Oracle APEX version 21.1 in OCI where I am capturing SYSTIMESTAMP to save any transaction in my APEX application which gets saved in UTC.
While displaying the date and time, I want to display the local time say of Sydney/Australia.
I can use the following to get the local time:
SELECT SYSTIMESTAMP AT TIME ZONE 'Australia/Sydney' FROM DUAL;
But to know the list of available Time Zones in Oracle DB, I used the following query:
SELECT * FROM gv$timezone_names;
It returned TZNAME, TZABBREV and CON_ID. It seems the TZABBREV is for daylight saving hours.
Can anyone kindly let me know how to use both TZNAME, TZABBREV values in the above query to get the correct local time from UTC.
Thanks and Regards
Hawker

This post has been answered by Solomon Yakobson on Sep 23 2021
Jump to Answer

Comments

Post Details

Added on Sep 18 2021
9 comments
18,191 views