Overview
time_zone specifies the time zone for the current tenant session. Valid values include the offset format '+08:00' and the region format Asia/Shanghai.
Privilege requirements
Query variables
Global level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Session level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Varchar |
| Default Value | +8:00 |
| Value range | -12:59 ~ +13:00 |
| Effective Scope |
|
| Modifiable | Yes, you can use theSETStatement modification. |
Configuration example
Set the time zone for the current tenant session to +08:00.
Session effective
obclient> SET time_zone='+08:00';Effective globally
obclient> SET GLOBAL time_zone='+08:00';