Setting the Time Zone Environment Variable

You can set the ORA_TZFILE environment variable to read the time zone file from the file system.

If ORA_TZFILE is not set, then Oracle Instant Client uses the larger, default timezlrg_n.dat file from the shared libraries (n denotes the time zone data file version number). If you want Oracle Instant Client to use the smaller timezone_n.dat file, then set the ORA_TZFILE environment variable to the name of the file without any absolute or relative path names.

For example:
$ export ORA_TZFILE=timezone_n.dat

where n is the time zone data file version number.

Run the genezi -v command to determine the client library time zone information.

To use an external time zone file, create an oracore/zoneinfo subdirectory under the Oracle Instant Client directory, and move the time zone file into this oracore/zoneinfo subdirectory. Now, set ORA_TZFILE to the time zone file name, without any absolute or relative path names.

Alternatively, you can place the external time zone file in any directory, and then set the ORA_TZFILE environment variable to the absolute path of the large or small time zone file you wish to use.

For example:
$ export ORA_TZFILE=/opt/oracle/config/timezone_n.dat

Oracle recommends that you use the same time zone file version in Oracle Instant Client as used in Oracle Database. Not using the same version returns an error such as ORA-1805 when querying TIMESTAMP WITH TIMEZONE columns.

To find the database time zone version, run the following command in SQL*Plus:
SELECT VERSION FROM V$TIMEZONE_FILE
To find the Instant Client time zone version, run the following command:
genezi -v

You can get new time zone files by copying them from a database installation or by contacting Oracle Support.