Hi Chris,

> By the way ... why not use the default Timezone configured for the VM
running the client code?
I don't even think there is a need to manually configure this at all.

You are right, and it's designed as you said right now.* If the timezone is
not set explicitly, the default timezone of system will be used.* It's just
a choice for user to set timezone manually.

You can check it in `getTimezone()` method.

Thank you. :D


Christofer Dutz <[email protected]> 于2020年10月30日周五 下午8:39写道:

> Hi all,
>
> great discussion ... I guess the first bug reports you got from me when
> working on the initial maven build were related to this :-)
> By the way ... why not use the default Timezone configured for the VM
> running the client code?
> I don't even think there is a need to manually configure this at all.
>
> Chris
>
> Am 30.10.20, 12:18 schrieb "Julian Feinauer" <
> [email protected]>:
>
>     Hi,
>
>     very good addition, indeed.
>     As one of the first users "far away" from China it was always a bit of
> math for me to get everything together with default settings (UTC+8?) : )
>
>     Julian
>
>     Am 30.10.20, 02:59 schrieb "Xiangwei Wei" <[email protected]>:
>
>         In the previous design, the timezone was set in IoTDB server
> configuration.
>         When one client gets the connection from the server,* it will keep
> the same
>         timezone as server.*
>
>         However, since IoTDB is becoming more and more international. Some
> user may
>         encounter problems, as their clients are in different timezone
> from their
>         servers, and muti clients may be in different timezone too, which
> lead to
>         that the time input by format in inserting or querying will be
> parsed to
>         the incorrect timestamp. And more, the time result show in client
> will be
>         incorrect too.
>
>         Actually, the design self before was unreasonable. *The timezone
> of server
>         is not important,* *which is only responsible for storing
> timestamp. On the
>         contrary, the client is the key*. Because how to parse the
> formatted time
>         submitted by client should be decided by the timezone of client
> itself.
>
>         For example, my client is in +08:00, while the server is in
> +01:00. Insert
>         a datapoint, "inser into root.sg.d1(time, s1) values (2020-10-30
> 09:48,
>         948)". The server will parse the formatted time by +08:00 instead
> of +01:00.
>
>         Therefore, I modified the timezone configuration in IoTDB. *Delete
> the
>         timezone configuration in server, and add a timezone parameter
> while the
>         client request a connection from server, which will be stored by
> server as
>         a client -> timezone map. *Then the server can handle the request
> from
>         every client correctly.
>
>
>         You can check it in PR[1]. Thank you :D
>
>         [1] https://github.com/apache/iotdb/pull/1846
>
>
>         --
>         Best,
>         Xiangwei Wei
>
>
>

-- 
Best,
Xiangwei Wei

Reply via email to