Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: update time-zone.md #876

Merged
merged 6 commits into from
Sep 11, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion sql/time-zone.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ category: user guide

# 时区支持

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete two extra spaces:

  • before "的默认值"
  • before "System 对应的"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对应的实际时区TiDB 集群 bootstrap 初始化时设置

* 优先使用 `TZ` 环境变量
* 如果失败,这从 `/etc/localtime` 的实际软链地址提取。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这 -> 则?

* 如果上面两种都失败则使用 `UTC` 作为系统时区。


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

Expand Down