Oracle / PLSQL: SESSIONTIMEZONE Function

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

Description

The Oracle/PLSQL SESSIONTIMEZONE feature returns the modern session’s time sector as a time area offset (in the following format: ‘[+|-]TZH:TZM’) or a time area place name.

Syntax

The syntax for the SESSIONTIMEZONE characteristic in Oracle/PLSQL is:

SESSIONTIMEZONE

Parameters or Arguments

There are no parameters or arguments for the SESSIONTIMEZONE function.

Returns

The SESSIONTIMEZONE characteristic returns a time area offset (in the following format: ‘[+|-]TZH:TZM’) or a time region place name.

Applies To

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

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

Example

Let’s seem to be at some Oracle SESSIONTIMEZONE feature examples and discover how to use the SESSIONTIMEZONE characteristic in Oracle/PLSQL.

For example:

SELECT SESSIONTIMEZONE
FROM dual;

The SESSIONTIMEZONE feature may return a cost like this:

+00:00

or a value such as this:

-07:00

The value back relies upon on how the consumer precise the session time zone price in the most latest ALTER SESSION statement. An instance of an ALTER SESSION command is:

ALTER SESSION SET TIME_ZONE = '-7:0';