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

TZ env not working #77

Open
xiaoweihong opened this issue Dec 16, 2024 · 0 comments
Open

TZ env not working #77

xiaoweihong opened this issue Dec 16, 2024 · 0 comments

Comments

@xiaoweihong
Copy link

xiaoweihong commented Dec 16, 2024

I use TZ=Asia/Shanghai.Container date is change as expected,but the log not change

root@k8s-master-91:~/ntp# cat run.sh
#!/bin/bash
docker rm -f ntp
docker run -it -d --name=ntp \
-e TZ="Asia/Shanghai" \
--restart=always \
-p 123:123/udp \
cturra/ntp
root@k8s-master-91:~/ntp# bash run.sh
ntp
dd8715a2ae353291d238e5bca50a54113177a7a3798b2ec9709f072cc6710929
root@k8s-master-91:~/ntp# docker logs  ntp
2024-12-16T09:01:03Z chronyd version 4.5 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG)
2024-12-16T09:01:03Z Disabled control of system clock
2024-12-16T09:01:03Z Could not read valid frequency and skew from driftfile /var/lib/chrony/chrony.drift
root@k8s-master-91:~/ntp# docker exec -it ntp sh
/ # date
Mon Dec 16 17:01:10 CST 2024
/ # env
HOSTNAME=dd8715a2ae35
SHLVL=1
HOME=/root
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
TZ=Asia/Shanghai
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

No branches or pull requests

1 participant