ubuntu18 解决系统时区引起tomcat时区变化

2020-05-24  本文已影响0人  Swye

1.查看系统时区

date -R

2. [endif]如果要修改时区,执行

sudo tzselect

根据屏幕内容输入你要的时区数字

3.复制文件到/etc目录下

sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

sudo apt-get install ntpdate

sudo ntpdate time.windows.com

sudo hwclock --localtime --systohc

修改/etc/timezone,将第一行改为:

Asia/Shanghai

上一篇下一篇

猜你喜欢

热点阅读