Note
This variable is available starting with V1.4.
Description
time_zone specifies the time zone for the current tenant session. You can set the value to an offset in the '+08:00' format or a region in the Asia/Shanghai format.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to obtain the value of a global system variable.Session level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to obtain the value of a session system variable.
Modify variables
Global level
The
systenant can directly modify the value of a global system variable.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.An Oracle user tenant must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
The
systenant and all user tenants can directly modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | +8:00 |
| Value range | -12:59 ~ +13:00 |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Set the time zone of the current tenant session to +08:00.
Session level
obclient> SET time_zone='+08:00';Global level
obclient> SET GLOBAL time_zone='+08:00';