This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 79f29f4  [doc] Update some out-of-date content in README and add some 
time zone usage (#3880)
79f29f4 is described below

commit 79f29f4af3db8ee6815eb72974092b31147e8358
Author: Haonan <[email protected]>
AuthorDate: Wed Sep 1 11:40:41 2021 +0800

    [doc] Update some out-of-date content in README and add some time zone 
usage (#3880)
---
 README.md                          | 86 ++++++++++++++++++++++++--------------
 README_ZH.md                       | 86 ++++++++++++++++++++++++--------------
 docs/Download/README.md            |  8 ++--
 docs/UserGuide/API/Time-zone.md    |  6 +++
 docs/zh/Download/README.md         |  6 +--
 docs/zh/UserGuide/API/Time-zone.md |  8 +++-
 6 files changed, 128 insertions(+), 72 deletions(-)

diff --git a/README.md b/README.md
index 9a9b1e1..01095ef 100644
--- a/README.md
+++ b/README.md
@@ -87,7 +87,7 @@ This short guide will walk you through the basic process of 
using IoTDB. For a m
 
 To use IoTDB, you need to have:
 
-1. Java >= 1.8 (1.8, 11, and 15 are verified. Please make sure the environment 
path has been set accordingly).
+1. Java >= 1.8 (1.8, 11, and 16 are verified. Please make sure the environment 
path has been set accordingly).
 2. Maven >= 3.6 (If you want to compile and install IoTDB from source code).
 3. Set the max open files num as 65535 to avoid "too many open files" error.
 4. (Optional) Set the somaxconn as 65535 to avoid "connection reset" error 
when the system is under high load.
@@ -258,12 +258,12 @@ We can also use SHOW STORAGE GROUP to check the storage 
group being created:
 
 ```
 IoTDB> SHOW STORAGE GROUP
-+-----------------------------------+
-|                      Storage Group|
-+-----------------------------------+
-|                            root.ln|
-+-----------------------------------+
-storage group number = 1
++-------------+
+|storage group|
++-------------+
+|      root.ln|
++-------------+
+Total line number = 1
 ```
 
 After the storage group is set, we can use CREATE TIMESERIES to create a new 
timeseries. When creating a timeseries, we should define its data type and the 
encoding scheme. Here We create two timeseries:
@@ -279,25 +279,25 @@ In order to query the specific timeseries, we can use 
SHOW TIMESERIES <Path>. <P
 
 ```
 IoTDB> SHOW TIMESERIES
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|                   timeseries  | alias|storage 
group|dataType|encoding|compression|tags|attributes|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|       root.ln.wf01.wt01.status|  null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
-|  root.ln.wf01.wt01.temperature|  null|      root.ln|   FLOAT|     RLE|     
SNAPPY|null|      null|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-Total timeseries number = 2
++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|                   timeseries|alias|storage 
group|dataType|encoding|compression|tags|attributes|
++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|root.ln.wf01.wt01.temperature| null|      root.ln|   FLOAT|     RLE|     
SNAPPY|null|      null|
+|     root.ln.wf01.wt01.status| null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+
+Total line number = 2
 ```
 
 2. Querying a specific timeseries(root.ln.wf01.wt01.status):
 
 ```
 IoTDB> SHOW TIMESERIES root.ln.wf01.wt01.status
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|                   timeseries  | alias|storage 
group|dataType|encoding|compression|tags|attributes|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|       root.ln.wf01.wt01.status|  null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-Total timeseries number = 1
++------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|              timeseries|alias|storage 
group|dataType|encoding|compression|tags|attributes|
++------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|root.ln.wf01.wt01.status| null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
++------------------------+-----+-------------+--------+--------+-----------+----+----------+
+Total line number = 1
 ```
 
 Insert timeseries data is a basic operation of IoTDB, you can use ‘INSERT’ 
command to finish this. Before insertion, you should assign the timestamp and 
the suffix path name:
@@ -311,12 +311,12 @@ The data that you have just inserted will display as 
follows:
 
 ```
 IoTDB> SELECT status FROM root.ln.wf01.wt01
-+-----------------------+------------------------+
-|                   Time|root.ln.wf01.wt01.status|
-+-----------------------+------------------------+
-|1970-01-01T08:00:00.100|                    true|
-|1970-01-01T08:00:00.200|                   false|
-+-----------------------+------------------------+
++------------------------+------------------------+
+|                    Time|root.ln.wf01.wt01.status|
++------------------------+------------------------+
+|1970-01-01T00:00:00.100Z|                    true|
+|1970-01-01T00:00:00.200Z|                   false|
++------------------------+------------------------+
 Total line number = 2
 ```
 
@@ -324,12 +324,34 @@ You can also query several timeseries data using one SQL 
statement:
 
 ```
 IoTDB> SELECT * FROM root.ln.wf01.wt01
-+-----------------------+--------------------------+-----------------------------+
-|                   Time|  
root.ln.wf01.wt01.status|root.ln.wf01.wt01.temperature|
-+-----------------------+--------------------------+-----------------------------+
-|1970-01-01T08:00:00.100|                      true|                         
null|
-|1970-01-01T08:00:00.200|                     false|                        
20.71|
-+-----------------------+--------------------------+-----------------------------+
++------------------------+-----------------------------+------------------------+
+|                    
Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status|
++------------------------+-----------------------------+------------------------+
+|1970-01-01T00:00:00.100Z|                         null|                    
true|
+|1970-01-01T00:00:00.200Z|                        20.71|                   
false|
++------------------------+-----------------------------+------------------------+
+Total line number = 2
+```
+
+To change the time zone in Cli, you can use the following SQL:
+
+```
+IoTDB> SET time_zone=+08:00
+Time zone has set to +08:00
+IoTDB> SHOW time_zone
+Current time zone: Asia/Shanghai
+```
+
+Add then the query result will show using the new time zone.
+
+```
+IoTDB> SELECT * FROM root.ln.wf01.wt01
++-----------------------------+-----------------------------+------------------------+
+|                         
Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status|
++-----------------------------+-----------------------------+------------------------+
+|1970-01-01T08:00:00.100+08:00|                         null|                  
  true|
+|1970-01-01T08:00:00.200+08:00|                        20.71|                  
 false|
++-----------------------------+-----------------------------+------------------------+
 Total line number = 2
 ```
 
diff --git a/README_ZH.md b/README_ZH.md
index 8f5830e..b357335 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -84,7 +84,7 @@ IoTDB的主要特点如下:
 ## 环境准备
 
 要使用IoTDB,您需要:
-1. Java >= 1.8 (目前 1.8、11和15 已经被验证可用。请确保环变量境路径已正确设置)。
+1. Java >= 1.8 (目前 1.8、11和16 已经被验证可用。请确保环变量境路径已正确设置)。
 2. Maven >= 3.6 (如果希望从源代码编译和安装IoTDB)。
 3. 设置 max open files 为 65535,以避免"too many open files"错误。
 4. (可选) 将 somaxconn 设置为 65535 以避免系统在高负载时出现 "connection reset" 错误。 
@@ -244,12 +244,12 @@ IoTDB> SET STORAGE GROUP TO root.ln
 
 ```
 IoTDB> SHOW STORAGE GROUP
-+-----------------------------------+
-|                      Storage Group|
-+-----------------------------------+
-|                            root.ln|
-+-----------------------------------+
-storage group number = 1
++-------------+
+|storage group|
++-------------+
+|      root.ln|
++-------------+
+Total line number = 1
 ```
 
 在设置存储组之后,我们可以使用CREATE TIMESERIES来创建一个新的TIMESERIES。
@@ -268,25 +268,25 @@ IoTDB> CREATE TIMESERIES root.ln.wf01.wt01.temperature 
WITH DATATYPE=FLOAT, ENCO
 
 ```
 IoTDB> SHOW TIMESERIES
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|                   timeseries  | alias|storage 
group|dataType|encoding|compression|tags|attributes|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|       root.ln.wf01.wt01.status|  null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
-|  root.ln.wf01.wt01.temperature|  null|      root.ln|   FLOAT|     RLE|     
SNAPPY|null|      null|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-Total timeseries number = 2
++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|                   timeseries|alias|storage 
group|dataType|encoding|compression|tags|attributes|
++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|root.ln.wf01.wt01.temperature| null|      root.ln|   FLOAT|     RLE|     
SNAPPY|null|      null|
+|     root.ln.wf01.wt01.status| null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+
+Total line number = 2
 ```
 
 2. 查询指定的 timeseries(root.ln.wf01.wt01.status):
 
 ```
 IoTDB> SHOW TIMESERIES root.ln.wf01.wt01.status
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|                   timeseries  | alias|storage 
group|dataType|encoding|compression|tags|attributes|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-|       root.ln.wf01.wt01.status|  null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-Total timeseries number = 1
++------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|              timeseries|alias|storage 
group|dataType|encoding|compression|tags|attributes|
++------------------------+-----+-------------+--------+--------+-----------+----+----------+
+|root.ln.wf01.wt01.status| null|      root.ln| BOOLEAN|   PLAIN|     
SNAPPY|null|      null|
++------------------------+-----+-------------+--------+--------+-----------+----+----------+
+Total line number = 1
 ```
 
 插入 timeseries 数据是IoTDB的一个基本操作,你可以使用`INSERT` 命令来完成这个操作。
@@ -301,12 +301,12 @@ IoTDB> INSERT INTO 
root.ln.wf01.wt01(timestamp,status,temperature) values(200,fa
 
 ```
 IoTDB> SELECT status FROM root.ln.wf01.wt01
-+-----------------------+------------------------+
-|                   Time|root.ln.wf01.wt01.status|
-+-----------------------+------------------------+
-|1970-01-01T08:00:00.100|                    true|
-|1970-01-01T08:00:00.200|                   false|
-+-----------------------+------------------------+
++-----------------------------+------------------------+
+|                         Time|root.ln.wf01.wt01.status|
++-----------------------------+------------------------+
+|1970-01-01T08:00:00.100+08:00|                    true|
+|1970-01-01T08:00:00.200+08:00|                   false|
++-----------------------------+------------------------+
 Total line number = 2
 ```
 
@@ -314,12 +314,34 @@ Total line number = 2
 
 ```
 IoTDB> SELECT * FROM root.ln.wf01.wt01
-+-----------------------+--------------------------+-----------------------------+
-|                   Time|  
root.ln.wf01.wt01.status|root.ln.wf01.wt01.temperature|
-+-----------------------+--------------------------+-----------------------------+
-|1970-01-01T08:00:00.100|                      true|                         
null|
-|1970-01-01T08:00:00.200|                     false|                        
20.71|
-+-----------------------+--------------------------+-----------------------------+
++-----------------------------+-----------------------------+------------------------+
+|                         
Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status|
++-----------------------------+-----------------------------+------------------------+
+|1970-01-01T08:00:00.100+08:00|                         null|                  
  true|
+|1970-01-01T08:00:00.200+08:00|                        20.71|                  
 false|
++-----------------------------+-----------------------------+------------------------+
+Total line number = 2
+```
+
+如果需要修改 Cli 中的时区,您可以使用以下语句:
+
+```
+IoTDB> SET time_zone=+00:00
+Time zone has set to +00:00
+IoTDB> SHOW time_zone
+Current time zone: Z
+```
+
+之后查询结果将会以更新后的新时区显示:
+
+```
+IoTDB> SELECT * FROM root.ln.wf01.wt01
++------------------------+-----------------------------+------------------------+
+|                    
Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status|
++------------------------+-----------------------------+------------------------+
+|1970-01-01T00:00:00.100Z|                         null|                    
true|
+|1970-01-01T00:00:00.200Z|                        20.71|                   
false|
++------------------------+-----------------------------+------------------------+
 Total line number = 2
 ```
 
diff --git a/docs/Download/README.md b/docs/Download/README.md
index 9be974a..7fe8c2f 100644
--- a/docs/Download/README.md
+++ b/docs/Download/README.md
@@ -89,7 +89,7 @@ Legacy version are available here: 
[https://archive.apache.org/dist/iotdb/](http
 
 - How to upgrade from v.11.x or v0.10.x to v0.12.x?
   * Upgrading from v0.11 or v0.10 to v0.12 is similar as v0.9 to v0.10. The 
upgrade tool will rewrite the data files automatically.
-  * Stop writing new data.
+  * **<font color=red>Stop writing new data.</font>**
   * Call `flush` command using sbin/start-cli.sh in original version to close 
all TsFiles.
   * We recommend to backup the data file (also the wal files and mlog.txt) 
before upgrading for rolling back.
   * Just download, unzip v0.12.x.zip, and modify conf/iotdb-engine.proeprties 
to let all the 
@@ -105,7 +105,7 @@ Legacy version are available here: 
[https://archive.apache.org/dist/iotdb/](http
 - How to upgrade from v.10.x to v0.11.x?
   * The data format (i.e., TsFile data) of v0.10.x and v0.11 are compatible, 
but the WAL file is 
   incompatible. So, you can follow the steps:
-  * Stop writing new data.
+  * **<font color=red>Stop writing new data.</font>**
   * Call `flush` command using `sbin/start-cli.sh` in v0.10.x to close all 
TsFiles.
   * We recommend to backup the the wal files and mlog.txt before upgrading for 
rolling back.
   * Just download, unzip v0.11.x.zip, and modify conf/iotdb-engine.proeprties 
to let all the 
@@ -116,9 +116,9 @@ Legacy version are available here: 
[https://archive.apache.org/dist/iotdb/](http
   * __NOTICE: V0.11 changes many settings in conf/iotdb-engine.properties, so 
do not use v0.10's 
     configuration file directly.__
 
-- How to upgrade from v.9.x to v0.10.x?
+- How to upgrade from v0.9.x to v0.10.x?
   * Upgrading from v0.9 to v0.10 is more complex than v0.8 to v0.9.
-  * Stop writing new data.
+  * **<font color=red>Stop writing new data.</font>**
   * Call `flush` command using sbin/start-client.sh in v0.9 to close all 
TsFiles.
   * We recommend to backup the data file (also the wal files and mlog.txt) 
before upgrading for rolling back.
   * Just download, unzip v0.10.x.zip, and modify conf/iotdb-engine.proeprties 
to let all the 
diff --git a/docs/UserGuide/API/Time-zone.md b/docs/UserGuide/API/Time-zone.md
index 40bf945..76f9c43 100644
--- a/docs/UserGuide/API/Time-zone.md
+++ b/docs/UserGuide/API/Time-zone.md
@@ -45,6 +45,12 @@ JDBC: (IoTDBConnection) connection.getTimeZone();
 Session: session.getTimeZone();
 ```
 
+In CLI:
+
+```sql
+SHOW time_zone
+```
+
 ## Time zone usage scenarios
 
 The IoTDB server only stores and processes time stamps, and the time zone is 
only used to interact with clients. The specific scenarios are as follows:
diff --git a/docs/zh/Download/README.md b/docs/zh/Download/README.md
index ed75eef..6221962 100644
--- a/docs/zh/Download/README.md
+++ b/docs/zh/Download/README.md
@@ -86,7 +86,7 @@
 
 - 如何从 v0.11.x 或 v0.10.x 升级到 v0.12.x? 
   * 从 0.11 或 0.10 升级到 0.12 的过程与 v0.9 升级到 v0.10 类似,升级工具会自动进行数据文件的升级。
-  * 停掉旧版本新数据写入。
+  * **<font color=red>停掉旧版本新数据写入。</font>**
   * 用 CLI 调用`flush`,确保关闭所有的 TsFile 文件。
   * 我们推荐提前备份数据文件(以及写前日志和 mlog 文件),以备回滚。
   * 下载最新版,解压并修改配置文件。将各数据目录都指向备份的或者 v0.11 或 0.10 原来使用的数据目录。 把 0.11 中的其他修改都放到 
0.12 中。
@@ -98,7 +98,7 @@
  
 - 如何从 v0.10.x 升级到 v0.11.x?
   * 0.10 与 0.11 的数据文件格式兼容,但写前日志等格式不兼容,因此需要进行升级(但速度很快):
-  * 停掉 0.10 的新数据写入。
+  * **<font color=red>停掉 0.10 的新数据写入。</font>**
   * 用 CLI 调用`flush`,确保关闭所有的 TsFile 文件。
   * 我们推荐提前备份写前日志和 mlog 文件,以备回滚。
   * 下载最新版,解压并修改配置文件。将各数据目录都指向备份的或者 v0.10 原来使用的数据目录。 
@@ -106,7 +106,7 @@
   * __注意:0.11 的配置文件进行了较大改动,因此不要直接将 0.10 的配置文件用于 0.11__
 
 - 如何从 v0.9.x 升级到 v0.10.x? 
-  * 停掉 0.9 的新数据写入。
+  * **<font color=red>停掉旧版本新数据写入。</font>**
   * 用 CLI 调用`flush`,确保关闭所有的 TsFile 文件。
   * 我们推荐提前备份数据文件(以及写前日志和 mlog 文件),以备回滚。
   * 下载最新版,解压并修改配置文件。将各数据目录都指向备份的或者 v0.9 原来使用的数据目录。 
diff --git a/docs/zh/UserGuide/API/Time-zone.md 
b/docs/zh/UserGuide/API/Time-zone.md
index 3c4a098..097db2a 100644
--- a/docs/zh/UserGuide/API/Time-zone.md
+++ b/docs/zh/UserGuide/API/Time-zone.md
@@ -33,7 +33,7 @@ Session: session.setTimeZone("+08:00");
 
 在 CLI 命令行工具中,通过 SQL 手动设置时区的方式为:
 
-```java
+```sql
 SET time_zone=+08:00
 ```
 
@@ -45,6 +45,12 @@ JDBC: (IoTDBConnection) connection.getTimeZone();
 Session: session.getTimeZone();
 ```
 
+CLI 中的方法为:
+
+```sql
+SHOW time_zone
+```
+
 ## 时区使用场景
 
 IoTDB 服务器只针对时间戳进行存储和处理,时区只用来与客户端进行交互,具体场景如下:

Reply via email to