Skip to content

Commit

Permalink
Merge pull request #876 from pingcap/zhexuany-patch-1
Browse files Browse the repository at this point in the history
sql: update time-zone.md
  • Loading branch information
lilin90 committed Sep 11, 2018
2 parents 27834a2 + 54dc80e commit 9c4905f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sql/time-zone.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ category: user guide

# 时区支持

TiDB 使用的时区由 `time_zone` 全局变量和 session 变量决定。`time_zone` 的初始值是机器当前的系统时区 'SYSTEM'。
TiDB 使用的时区由 `time_zone` 全局变量和 session 变量决定。`time_zone` 的默认值是 `System``System` 对应的实际时区在 `TiDB` 集群 bootstrap 初始化时设置。具体逻辑如下:

* 优先使用 `TZ` 环境变量
* 如果失败,则从 `/etc/localtime` 的实际软链地址提取。
* 如果上面两种都失败则使用 `UTC` 作为系统时区。


在运行过程中可以修改全局时区:

Expand Down

0 comments on commit 9c4905f

Please sign in to comment.