DBTIMEZONE

DBTIMEZONE is a function in SQL that returns the database time zone. The result represents the difference between the local time zone and Coordinated Universal Time (UTC). Note that the value returned by DBTIMEZONE does not change based on the session time zone.

DBTIMEZONE()

Example

SELECT DBTIMEZONE FROM DUAL;

Output

+08:00

Explanation

The DBTIMEZONE function in Oracle is used to get the database time zone offset. The above example SQL query when executed fetches the current timezone of the database. The result ‘+08:00’ indicates that the database is 8 hours ahead of Coordinated Universal Time (UTC).

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.