Skip to Main Content

SQL & PL/SQL

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!

Incorrect time when Europe/Moscow Timezone converts to GMT/UTC.

nagi06Mar 31 2016 — edited Apr 4 2016

Hi All,

Europe/Moscow timezone doesn't have Daylight saying, but when I try to use below SQL for converting Europe/Moscow Timezone to GMT, it results one hour less than actual time.

SQL returns 16:30:00 GMT, but actual time is 17:30:00 GMT.


Is there any other approach to get the correct value in Oracle.


SQL

SELECT TO_CHAR (FROM_TZ (CAST (TO_DATE ('0331201620:30:00',

                                        'MMDDYYYYHH24:MI:SS'

                                       ) AS TIMESTAMP

                              ),

                         'Europe/Moscow'

                        ) AT TIME ZONE 'GMT', 'HH24:MI:SS')

  FROM DUAL;

Oracle Version

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

PL/SQL Release 11.2.0.3.0 - Production

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2016
Added on Mar 31 2016
3 comments
808 views