nebula
nebula copied to clipboard
datetime vertex ‘s return value changed
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.
Your Environments (required) Not relevant. I use 3.2.0.
How To Reproduce(required)
Steps to reproduce the behavior:
-
Step 1 I set storage and graph config with the follow two --daemonize=true --timezone_name=UTC+08:00
-
Step 2 when i insert a vertex with datatime ,such as datetime("2017-03-04T22:30:40.003000[Asia/Shanghai]")
-
Step 3 I get a different return with original value;
Expected behavior
Additional context
Hello, we will convert the time data to UTC, so what you got is UTC time.
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'
复现的命令: 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
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.