select sysdate from dual;
15-NOV-2018 23:09:31
select cast(sysdate as TIMESTAMP) from dual;
15-NOV-18 11.07.47.000000000 PM
select sys_extract_utc(cast(sysdate as TIMESTAMP)) from dual;
15-NOV-18 05.40.35.000000000 PM
But,
select systimestamp from dual;
15-NOV-18 11.11.16.345959000 PM -08:00
select sys_extract_utc(systimestamp) from dual;
16-NOV-18 07.08.49.772214000 AM
Further,
select cast(sysdate as TIMESTAMP) at time zone 'UTC' from dual;
15-NOV-18 05.48.11.000000000 PM UTC
Why is sys_extract_utc(cast(sysdate as TIMESTAMP)) different than sys_extract_utc(systimestamp) in my db?
The time given by sys_extract_utc(systimestamp) is the correct UTC time, btw.
My core requirement is converting data from a table with a DATE column to "DATE in UTC time zone" in a select query. It is of course not working (with either sys_extract_utc or with at time zone 'UTC'), which is probably because of the same reason the above conversion with sysdate is not working.
In case it helps, dbtimezone is:
SELECT DBTIMEZONE FROM DUAL;
+00:00