nebula
nebula copied to clipboard
`date()` can't return the correct result, when the time zone is set to UTC+12
Describe the bug (required)
After setting the time zone of the database, RETURN date() cannot return the correct result.
Your Environments (required)
- OS:
uname -a
Linux VM_0_7_centos 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
- Compiler:
g++ --versionorclang++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
- CPU:
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
- Commit id: v3.6.0
How To Reproduce(required)
Steps to reproduce the behavior:
- Step 1
nebula-graphd.conf
--timezone_name=UTC+12:00
- Step 2
Nebula Studio:
> RETURN date();
2024-06-05
- Step 3
Nebula Studio:
> RETURN datetime();
2024-06-06T03:14:00.986000
Expected behavior
We expect date() to be the same as datetime() and return 2024-06-06,
Because the local time in time zone (UTC+12) is 2024-06-06.
Additional context
My system time:
root> date
Wed Jun 5 23:14:00 CST 2024
Hi, I’m Artem from OSS Revival. We specialize in revitalizing and maintaining open-source projects for long-term stability. I'm already working on a solution to this issue, as well as the similar one #5735