Oracle / PLSQL: DBTIMEZONE Function

This article is written about how to use the Oracle/PLSQL DBTIMEZONE function with syntax and examples.

Description

The Oracle/PLSQL DBTIMEZONE function returns the database time zone as a time zone offset (in the following format: ‘[+|-]TZH:TZM’) or a time zone region name.

Syntax

The syntax for the DBTIMEZONE function in Oracle/PLSQL is:

DBTIMEZONE

Parameters or Arguments

There are no parameters or arguments for the DBTIMEZONE function.

Returns

The DBTIMEZONE function returns a time zone offset (in the following format: ‘[+|-]TZH:TZM’) or a time zone region name.

Applies To

The DBTIMEZONE function can be used in the following versions of Oracle/PLSQL:

Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i

Example

Let’s look at some Oracle DBTIMEZONE function examples and explore how to use the DBTIMEZONE function in Oracle/PLSQL.

For example:

select DBTIMEZONE
from dual;

The DBTIMEZONE function might return a value like this:

+00:00

or a value such as this:

-07:00

The value returned depends on the time zone value set in your individual Oracle database.