# check now timezone
$ date -R
Sun, 21 Oct 2018 23:35:04 +0800
# change timezone to Shanghai if it is wrong
apt update
apt install -y 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.
Universal Time is now: Sun Oct 21 14:33:36 UTC 2018.
相关文章
- 06-06djiango中修改时区,默认按照美国时间,修改成北京时间
- 06-06Docker学习:容器的优化 | Dockerfile优化 | 如何修改时区
- 06-06Ubuntu18.04中安装virtualenv和virtualenvwrapper
- 06-06Ubuntu18.04中安装virtualenv和virtualenvwrapper
- 06-06egg中sequelize,时区问题,开发时修改表结构
- 06-06Ubuntu 18.04服务器中安装和配置Odoo 13
- 06-06ubuntu 指令修改时区 tzselect
- 06-06Ubuntu 18.04 LTS修改 国内源(以中科大源为例)
- 06-06Ubuntu18.04修改dns
- 06-06在ubuntu 18.04中安装mysql的问题