修改docker 中时区的方法

# check now timezone
$ date -R
Sun, 21 Oct 2018 23:35:04 +0800


# change timezone to Shanghai if it is wrong
apt-get update
apt-get install tzdata

echo "Asia/Shanghai" > /etc/timezone
rm -f /etc/localtime
# maybe you need to rm -rf /usr/share/zoneinfo/UTC
dpkg-reconfigure -f noninteractive tzdata

# output
Current default time zone: 'Asia/Shanghai'
Local time is now: Sun Oct 21 22:33:36 CST 2018.

posted @ 2020-06-11 16:30  超超小仙女  阅读(562)  评论(0编辑  收藏  举报