nebula icon indicating copy to clipboard operation
nebula copied to clipboard

datetime vertex ‘s return value changed

Open jinyingsunny opened this issue 2 years ago • 4 comments

Please check the FAQ documentation before raising an issue

Describe the bug (required)

I insert a datetime vertex ,when i query the return value changed. 11111

Your Environments (required) Not relevant. I use 3.2.0.

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1 I set storage and graph config with the follow two --daemonize=true --timezone_name=UTC+08:00 2222222

  2. Step 2 when i insert a vertex with datatime ,such as datetime("2017-03-04T22:30:40.003000[Asia/Shanghai]")

  3. Step 3 I get a different return with original value;

11111

Expected behavior

Additional context

jinyingsunny avatar Jul 15 '22 09:07 jinyingsunny

Hello, we will convert the time data to UTC, so what you got is UTC time.

Shylock-Hg avatar Jul 19 '22 08:07 Shylock-Hg

Run this command and show the result:

curl 127.0.0.1:19669/flags | grep 'timezone_name'
curl 127.0.0.1:19779/flags | grep 'timezone_name'

Shylock-Hg avatar Jul 19 '22 09:07 Shylock-Hg

复现的命令: CREATE TAG IF NOT EXISTS date1(p1 date, p2 time, p3 datetime);

INSERT VERTEX date1(p1, p2, p3) VALUES "test2":(date("2021-03-17"), time("17:53:59"), datetime("2017-03-04T22:30:40.003000[Asia/Shanghai]"));

MATCH (v:date1) where id(v)=="test2" RETURN id(v),v.date1.p1,v.date1.p2,v.date1.p3 limit 10;

grep timezone_name /usr/local/nebula-graph-ent-3.1.2-1.ubuntu2004.amd64/etc/*.conf

image

image

image

jinyingsunny avatar Jul 20 '22 06:07 jinyingsunny

Ok, I got it. It's a bug caused by twice timezone conversion. Once specified in datetime literal, once is global timezone configuration in cluster.

Shylock-Hg avatar Jul 21 '22 02:07 Shylock-Hg