You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2021/06/27 13:54:04 UTC

[iotdb] branch timezonedoc created (now 0234faa)

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

xiangweiwei pushed a change to branch timezonedoc
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 0234faa  Add time zone doc

This branch includes the following new commits:

     new 0234faa  Add time zone doc

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[iotdb] 01/01: Add time zone doc

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0234faaad2e1bdaf9b3f8ec428a309ce97cdef0b
Author: Alima777 <wx...@gmail.com>
AuthorDate: Sun Jun 27 21:53:35 2021 +0800

    Add time zone doc
---
 docs/zh/UserGuide/CLI/Time zone.md | 45 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/docs/zh/UserGuide/CLI/Time zone.md b/docs/zh/UserGuide/CLI/Time zone.md
new file mode 100644
index 0000000..47a6a6f
--- /dev/null
+++ b/docs/zh/UserGuide/CLI/Time zone.md	
@@ -0,0 +1,45 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+# 时区
+
+客户端连接 IoTDB 服务器时,可以指定该连接所要使用的时区。如果未指定,则**默认以服务器所在的时区作为默认的时区值。**
+
+时区被用来:1. 将客户端传来的时间格式的字符串转化为相应的时间戳;2. 将服务器返回给客户端结果中包含的时间戳转化为时间格式字符串。
+
+在 JDBC 和 Session 原生接口连接中均可以设置时区,使用方法如下:
+
+```java
+(IoTDBConnection) connection.setTimeZone("+08:00");
+
+session.setTimeZone("+08:00");
+```
+
+查看当前连接使用的时区的方法如下:
+
+```java
+(IoTDBConnection) connection.getTimeZone();
+
+session.getTimeZone();
+```
+
+
+