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

请教docker启动的如何修改查询语句显示的时间/时区 #691

Closed
lambda-zhang opened this issue Oct 8, 2024 · 1 comment · Fixed by #713
Closed

请教docker启动的如何修改查询语句显示的时间/时区 #691

lambda-zhang opened this issue Oct 8, 2024 · 1 comment · Fixed by #713

Comments

@lambda-zhang
Copy link

Environment:

  • OS: [e.g. Ubuntu 18.04]
  • CPU: [e.g. Intel Xeon xxxx]
  • TuGraph-DB Version tugraph-mini-runtime-ubuntu18.04:4.5.0

Describe the bug

默认启动的容器内部时区不对,把容器内部时间该对之后,页面上查询的时间还是不对

How to reproduce and expected behavior

docker启动

docker run -d --name tugraph_demo \
                -e TZ="Asia/Shanghai" \
        -v $(pwd)/data:/var/lib/lgraph/data \
        -v $(pwd)/log:/var/log/lgraph_log \
        -p 7070:7070  \
        -p 7687:7687 \
        -p 9090:9090 \
                tugraph/tugraph-mini-runtime-ubuntu18.04:4.5.0 lgraph_server

启动之后查看时间,发现和显示时间查8个小时(实际应该是Tue, 08 Oct 2024 20:48:53)

$ docker exec -it tugraph_demo /bin/bash
# date -R
Tue, 08 Oct 2024 12:48:53 +0000

在容器内部安装tzdata, 命令行看到时间对了

# apt-get update
# apt-get update tzdata
# date -R
Tue, 08 Oct 2024 21:20:10 +0800

重启容器

$ docker stop tugraph_demo
$ docker start tugraph_demo

再进入容器内部看时区是对的,在网页上查询

return datetime()

返回的结果

2024-10-08 13:20:41.711771000

还是差8个小时

@ljcui
Copy link
Collaborator

ljcui commented Oct 12, 2024

后续的版本修复

zhjwpku added a commit to zhjwpku/tugraph-db that referenced this issue Oct 24, 2024
ljcui pushed a commit to zhjwpku/tugraph-db that referenced this issue Oct 25, 2024
@ljcui ljcui closed this as completed in e4c5a44 Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants