Oracle SYS_EXTRACT_UTC: Return Type and Time Zone Examples
Oracle SYS_EXTRACT_UTC() extracts the UTC value from a datetime value that has a time-zone offset or region.
A common point of confusion is the return type: SYS_EXTRACT_UTC() returns a TIMESTAMP value representing UTC; the result itself does not carry a time-zone offset or region.
Syntax
SYS_EXTRACT_UTC(datetime_with_timezone)
Parameter
datetime_with_timezone-
A datetime value with a time-zone offset or time-zone region. If the input does not explicitly include a time zone, Oracle associates it with the current session time zone before converting it to UTC.
Return Type
SYS_EXTRACT_UTC() returns a TIMESTAMP value in UTC.
For example, an input at -08:00 is shifted eight hours forward:
SELECT SYS_EXTRACT_UTC(
TIMESTAMP '2026-10-07 12:00:00 -08:00'
) AS utc_time
FROM dual;
Conceptually, the result is:
2026-10-07 20:00:00The returned value represents UTC, but it is not a TIMESTAMP WITH TIME ZONE value.
Using a Time-Zone Region
You can combine FROM_TZ() with SYS_EXTRACT_UTC() when you have a timestamp without a time zone:
SELECT SYS_EXTRACT_UTC(
FROM_TZ(
TIMESTAMP '2026-07-01 09:00:00',
'America/New_York'
)
) AS utc_time
FROM dual;
Using a region such as America/New_York lets Oracle apply the appropriate daylight-saving rule for that date.
What Happens If the Input Has No Time Zone?
Oracle associates a datetime without an explicit time zone with the session time zone.
For example:
ALTER SESSION SET TIME_ZONE = '+08:00';
SELECT SYS_EXTRACT_UTC(
TIMESTAMP '2026-10-07 12:00:00'
) AS utc_time
FROM dual;
The timestamp is treated as 12:00:00 +08:00, so the UTC value is 04:00:00.
Because this behavior depends on SESSIONTIMEZONE, explicitly attaching the intended time zone with FROM_TZ() is usually clearer when the source timestamp has no zone information.
SYS_EXTRACT_UTC vs AT TIME ZONE
Use SYS_EXTRACT_UTC() when you want a plain UTC TIMESTAMP value.
Use AT TIME ZONE 'UTC' when you want to keep a time-zone-aware TIMESTAMP WITH TIME ZONE result.
SELECT
SYSTIMESTAMP AT TIME ZONE 'UTC' AS utc_with_zone,
SYS_EXTRACT_UTC(SYSTIMESTAMP) AS utc_timestamp
FROM dual;
Summary
SYS_EXTRACT_UTC()converts a datetime value to UTC.- It returns a
TIMESTAMP, notTIMESTAMP WITH TIME ZONE. - An explicit offset or region is honored.
- If no time zone is specified, Oracle uses the session time zone.
- Use
FROM_TZ()first when you need to attach a time zone to a plainTIMESTAMP.
See Oracle’s SYS_EXTRACT_UTC documentation.