PL/SQL (MOSC)

MOSC Banner

date to timestamp with timezone and daylight saving going wrong

edited Jul 21, 2016 10:45AM in PL/SQL (MOSC) 8 commentsAnswered ✓

Hi all!

I have a table with date values.

I need to convert them to UTC.

I would like to use sys_extract_utc so I have to convert them to timestamp with time zone

This is where I have a problem:

While

select TO_CHAR(cast(to_date('01.07.2016 10:13','DD.MM.YYYY HH24:MI') as timestamp with time zone) at time zone 'Europe/Vienna', 'YYYY-MM-DD HH24:MI:SS TZR TZD') from dual;

-> 2016-07-01 10:13:00 EUROPE/VIENNA CEST

works fine

but this does not:

select TO_CHAR(cast(to_date('01.01.2016 10:13','DD.MM.YYYY HH24:MI') as timestamp with time zone) at time zone 'Europe/Vienna', 'YYYY-MM-DD HH24:MI:SS TZR TZD') from dual;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center