TZ_OFFSET Date function in oracle

By Santhosh N

This explains how to get the offset value of the specified time zone in oracle.

There is function by the name, TZ_OFFSET which is used to get the offset value of the time zone specified.

Syntax: TZ_OFFSET (TimeZone)

Here, TimeZone is the valid time zone name or also it can be offset value from UTC. You can also have oracle other data functions SESSIONTIMEZONE or DBTIMEZONE as parameters.

To get all the valid time zones you can use the following query in oracle
SELECT DISTINCT tzname FROM V$TIMEZONE_NAMES;

Ex1: SELECT TZ_OFFSET('US/PACIFIC') FROM dual;
This returns “-07:00”

Ex2: SELECT TZ_OFFSET(SESSIONTIMEZONE) FROM dual;
This returns something like “-07:00”

Related FAQs

This explains the difference between two oracle date functions namely LOCALTIMESTAMP and CURRENT_TIMESTAMP.
This explains how to get the current date and time in the time zone of the current SQL session which is set by the Alter session command.
This explains how to get the Database Time zone information that is set to the current session.
This explains how to convert the timestamp value to the timestamp with time zone in oracle.
This explains how to get the current date and time along with the time zone that is set for the session.
This explains how to add the number of months to a given date in oracle
TZ_OFFSET Date function in oracle  (2771 Views)