TimeZoneFileLocation

This property specifies the time zone file directory.

Declaration

// C#
public string TimeZoneFileLocation {get; set;}

Property Type

System.String

Remarks

Countries and regions can alter when they observe daylight saving time or other changes for their time zones. Oracle publishes new time zone files to keep databases updated. Administrators then deploy these files to the database and clients to keep them in sync. Mismatched time zone settings between server and client can cause errors, such as ORA-01882: timezone region not found.

ODP.NET has built-in time zone settings that are up to date when it was published. To incorporate new settings, an administrator deploys the time zone file to a directory location and sets TimeZoneFileLocation to that location before the ODP.NET app opens its first connection.

This property only accepts a directory location, not a file name.

ODP.NET will use the highest time zone file version among those in the directory and the ODP.NET embedded time zone file.

The backslash (\) is a special character in .NET that represents the beginning of an escape sequence. To specify a directory location, use any one of the following formats in .NET to correctly represent backslashes in a directory location:

// C#
OracleConfiguration.TimeZoneFileLocation= "D:\\oracle\\client\\timezoneloc";
OracleConfiguration.TimeZoneFileLocation= @"D:\oracle\client\timezoneloc";
OracleConfiguration.TimeZoneFileLocation= "D:/oracle/client/timezoneloc";

Exceptions

ArgumentException - if a file is specified along with a directory.

ArgumentException - if an incorrect or empty directory is specified.