Skip to Main Content

SQL Developer

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!

Timezone Discripencies

Hi,

we are facing some issues with timestamp especially in Mexico time zone. Below query executed in sql developer.

Sqldeveloper:-

select cast(date'2023-03-03' as timestamp) at time zone 'UTC' d1,
cast(date'2023-03-03' as timestamp) at time zone 'America/Mexico_City' d2
from dual union all
select cast(date'2023-04-08' as timestamp) at time zone 'UTC' d1,
cast(date'2023-04-08' as timestamp) at time zone 'America/Mexico_City' d2
from dual;

D1 D2


02-MAR-23 06.30.00.000000000 PM UTC 02-MAR-23 12.30.00.000000000 PM AMERICA/MEXICO_CITY
07-APR-23 06.30.00.000000000 PM UTC 07-APR-23 01.30.00.000000000 PM AMERICA/MEXICO_CITY

Same query works fine in SQL plus and shows properly. Kindly suggest fixing the same.

sqlplus.

D1 D2
-------------------------------------------------------------------------------------------------------------------------------
02-MAR-23 06.30.00.000000 PM UTC 02-MAR-23 12.30.00.000000 PM AMERICA/MEXICO_CITY
07-APR-23 06.30.00.000000 PM UTC 07-APR-23 12.30.00.000000 PM AMERICA/MEXICO_CITY

Comments
Post Details
Added on Apr 4 2023
1 comment
743 views