You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xu...@apache.org on 2020/11/03 19:07:14 UTC

[iotdb] branch python_session_time_zone_fix created (now ac9a457)

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

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


      at ac9a457  fix time zone

This branch includes the following new commits:

     new ac9a457  fix time zone

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: fix time zone

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

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

commit ac9a457008686d312457fb38bf06fca4b6eff2d8
Author: 151250176 <15...@smail.nju.edu.cn>
AuthorDate: Wed Nov 4 03:06:44 2020 +0800

    fix time zone
---
 client-py/src/Session.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/client-py/src/Session.py b/client-py/src/Session.py
index f9ee8f0..b9e90fd 100644
--- a/client-py/src/Session.py
+++ b/client-py/src/Session.py
@@ -52,7 +52,7 @@ class Session(object):
         self.protocol_version = TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3
         self.__session_id = None
         self.__statement_id = None
-        self.__zone_id = None
+        self.__zone_id = 'UTC'
 
     def open(self, enable_rpc_compression):
         if not self.__is_close:
@@ -72,7 +72,8 @@ class Session(object):
 
         open_req = TSOpenSessionReq(client_protocol=self.protocol_version,
                                     username=self.__user,
-                                    password=self.__password)
+                                    password=self.__password,
+                                    zoneId=self.__zone_id)
 
         try:
             open_resp = self.__client.openSession(open_req)