The TZ_OFFSET function returns the time zone offset of the n time zone. The time zone offset is the difference (in hours and minutes) between a specified time zone and the UTC+0 time zone.
Syntax
TZ_OFFSET (n)
Parameters
| Parameter | Description |
|---|---|
| n | The name of the time zone region. |
Return type
VARCHAR2 data type
Examples
The following example returns the time zone offsets of the current session time zone specified by SESSIONTIMEZONE, the database time zone specified by DBTIMEZONE, and the US/Eastern time zone:
SELECT TZ_OFFSET(SESSIONTIMEZONE),TZ_OFFSET(DBTIMEZONE),TZ_OFFSET('US/Eastern') FROM DUAL;
The following query result is returned:
+----------------------------+-----------------------+-------------------------+
| TZ_OFFSET(SESSIONTIMEZONE) | TZ_OFFSET(DBTIMEZONE) | TZ_OFFSET('US/EASTERN') |
+----------------------------+-----------------------+-------------------------+
| +08:00 | +00:00 | -04:00 |
+----------------------------+-----------------------+-------------------------+