This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 0fe7f4016ad Added documentation for Interval Sharding Algorithm's
handling of time zones. (#19170)
0fe7f4016ad is described below
commit 0fe7f4016ad5d4d2776411ee313fef6997e4ccee
Author: Ling Hengqian <[email protected]>
AuthorDate: Fri Jul 15 08:12:55 2022 +0800
Added documentation for Interval Sharding Algorithm's handling of time
zones. (#19170)
---
.../user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.cn.md | 4 +++-
.../user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.en.md | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.cn.md
index 20160776465..09e9d1027dd 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.cn.md
@@ -86,7 +86,9 @@ Apache ShardingSphere 内置的标准分片算法实现类包括:
#### 时间范围分片算法
-当传入的分片键为 `java.time.Instant` 时存在特例处理,其会携带上系统的时区信息后转化为 `datetime-pattern`
的字符串格式, 再进行下一步分片。
+此算法主动忽视了 `datetime-pattern` 的时区信息。
+这意味着当 `datetime-lower`, `datetime-upper` 和传入的分片键含有时区信息时,不会因为时区不一致而发生时区转换。
+当传入的分片键为 `java.time.Instant` 时存在特例处理,其会携带上系统的时区信息后转化为 `datetime-pattern`
的字符串格式,再进行下一步分片。
类型:INTERVAL
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.en.md
index a6e55cc2c03..ffb14ded913 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding.en.md
@@ -89,6 +89,8 @@ Attributes:
#### Interval Sharding Algorithm
+This algorithm actively ignores the time zone information of
`datetime-pattern`.
+This means that when `datetime-lower`, `datetime-upper` and the incoming shard
key contain time zone information, time zone conversion will not occur due to
time zone inconsistencies.
When the incoming sharding key is `java.time.Instant`, there is a special
case, which will carry the time zone information of the system and convert it
into the string format of `datetime-pattern`, and then proceed to the next
sharding.
Type: INTERVAL