Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CorvusYe opened this issue Jun 5, 2024 · 0 comments
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected

Comments

@CorvusYe
Copy link

CorvusYe commented Jun 5, 2024

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 CorvusYe added the type/bug Type: something is unexpected label Jun 5, 2024
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

1 participant