Start of change

SET SESSION TIME ZONE

The SET SESSION TIME ZONE statement assigns a value to the SESSION TIME ZONE special register.

Invocation

This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.

Authorization

None required.

Syntax

Read syntax diagram
        .-SESSION-.              .-=-.                        
>>-SET--+---------+-- TIME ZONE--+---+--+-string-constant-+----><
                                        '-variable--------'   

Description

string-constant
Identifies a time zone with a value of the form '±th:tm' , where th represents the time zone hour between -12 and +14, and tm represents the time zone minutes between 0 and 59, with values ranging from -12:59 to +14:00.
variable
Specifies a variable that contains a time zone. The variable must be a CHAR or VARCHAR variable that is not followed by an indicator variable. The variable must not be the null value. The value must be left justified and be of the form '±th:tm' , where th represents the time zone hour between -12 and +14, and tm represents the time zone minutes between 0 and 59, with values ranging from -12:59 to +14:00.

Notes

Impact on other special registers:
Setting the SESSION TIME ZONE special register does not affect the CURRENT TIMEZONE special register.
Syntax alternatives:
SESSIONTIMEZONE, SESSION TIMEZONE, and TIMEZONE can be specified as an alternative to SESSION TIME ZONE or TIME ZONE.

Example

Set the SESSION TIME ZONE as -8:00:
	SET SESSION TIME ZONE = '-8:00';
End of change