处理办法

Centos系列

# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Asia/Shanghai"
UTC=false
ARC=false
Ubuntu系列

export JAVA_OPTS="\$JAVA_OPTS -Duser.timezone=Asia/Shanghai"

通用

echo 'Asia/Shanghai' > /etc/timezone
END