nebula icon indicating copy to clipboard operation
nebula copied to clipboard

`date()` can't return the correct result, when the time zone is set to UTC+12

Open CorvusYe opened this issue 1 year ago • 1 comments

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++ --version or clang++ --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:

  1. Step 1

nebula-graphd.conf

--timezone_name=UTC+12:00
  1. Step 2

Nebula Studio:

> RETURN date();

2024-06-05

  1. 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

CorvusYe avatar Jun 05 '24 15:06 CorvusYe

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

ghost avatar Feb 27 '25 15:02 ghost