Purpose
This function returns the time zone offset of the current session time zone SESSIONTIMEZONE or the database time zone DBTIMEZONE.
Note
A time zone offset is the difference between the local time zone and Coordinated Universal Time (UTC) in hours and minutes.
Syntax
TZ_OFFSET({ SESSIONTIMEZONE | DBTIMEZONE})
Parameters
Parameter |
Description |
|---|---|
| SESSIONTIMEZONE | The time zone of the current session. |
| DBTIMEZONE | The time zone of the database. |
Return type
VARCHAR2
Examples
Return the time zone offset of the current session time zone SESSIONTIMEZONE and the database time zone DBTIMEZONE.
obclient> SELECT TZ_OFFSET(SESSIONTIMEZONE),TZ_OFFSET(DBTIMEZONE) FROM DUAL;
+----------------------------+-----------------------+
| TZ_OFFSET(SESSIONTIMEZONE) | TZ_OFFSET(DBTIMEZONE) |
+----------------------------+-----------------------+
| +08:00 | +00:00 |
+----------------------------+-----------------------+
1 row in set
