SYS_EXTRACT_UTC

Syntax

SYS_EXTRACT_UTC
(
  time  IN timestamp with time zone
)
RETURNS timestamp without time zone;

SYS_EXTRACT_UTC
(
  time  IN timestamp without time zone
)
RETURNS timestamp without time zone;

Overview

The SYS_EXTRACT_UTC function converts the given timestamp (with/without time zone) to a timestamp in UTC (without timezone) and returns it.

For TIMESTAMP (without time zone), the value is interpreted based on the time zone of the session, then converted to a timestamp in UTC and returned.

In other words, theTIMESTAMP without time zone type is first converted to a TIMESTAMP WITH TIME ZONE, then shifted to the "utc" time zone and returned like a DATE in Oracle.

Parameters

Parameter
Description

time

timestamp, timestamptz type: the target timestamp value to convert to UTC. For timestamp, it is internally converted to timestamptz based on the timezone of the session and then converted to UTC.

Example

Last updated