Use the CLIENT_TZ environment option to set the timezone offset from GMT to use in the current session for evaluating the built-in CURRENT and TODAY functions. If you specify OFF or DEFAULT, values returned from CURRENT and TODAY use the timezone of the database server.
To specify a timezone offset, use the following format for the CLIENT_TZ 3value, and enclose the 3value between a pair of single ( ' ) or double ( " ) quotation marks:
>>-+- +-+--hour--:--minute------------------------------------->< '- --'
Element | Description | Restrictions | Syntax |
---|---|---|---|
hour | Number of hours in timezone offset from Greenwich Mean Time (GMT) | Must be an integer in the range -14 < hour <14 | Literal Number, p. Literal Number |
minute | Additional minutes in timezone offset from Greenwich Mean Time (GMT) | Must be a 2-digit integer in the range 00 to 59 inclusive | Literal Number, p. Literal Number |
A positive ( + ) offset implies a time zone whose location is west of zero longitude ( = GMT). A negative offset implies a time zone east of zero longitude. The following statement specifies an offset of five hours and fifteen minutes:
SET ENVIRONMENT CLIENT_TZ '+5:15'
If the statement in this statement executed successfully, then subsequent calls to the CURRENT function in the same session return a time-of-day value that is 5 hours and 15 minutes greater than the default value with no offset.
If a CLIENT_TZ value has been previously specified, the keyword ON tells the database server to use that value.
The CLIENT_TZ value that you specify in the SET ENVIRONMENT statement temporarily overrides any CLIENT_TZ setting of the IBM_XPS_PARAMS environment variable for the duration of the current session.
The onstat -g ses command can display the current CLIENT_TZ setting.
In a distributed transaction that you initiate from Extended Parallel Server, but in which remote Dynamic Server instances evaluate CURRENT or TODAY values, the CLIENT_TZ setting is ignored by Dynamic Server.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]