启动命令时再环境变量中添加
"-Duser.timezone=Asia/Shanghai"
java  -Duser.timezone=Asia/Shanghai

具体启动命令

#!/bin/bash

current_path=`pwd`
case "`uname`" in
    Linux)
        bin_abs_path=$(readlink -f $(dirname $0))
        ;;
    *)
        bin_abs_path=`cd $(dirname $0); pwd`
        ;;
esac
base=${bin_abs_path}/..
export LANG=en_US.UTF-8
export BASE=$base
SERVICE_NAME=spring_boot_docker_image_test


## set java path
if [ -z "$JAVA" ] ; then
  JAVA=$(which java)
echo $JAVA
fi

LOG_PATH=/var/logs/${SERVICE_NAME}

if [ "$1" = "test" ]; then
JAVA_OPTS=" $JAVA_OPTS -server -Xmx128m -Xms128m -Xmn64m -XX:PermSize=16m -XX:MaxPermSize=64m -Xss256k "
else
JAVA_OPTS="-server -Xms128m -Xmx128m -Xmn64m -XX:SurvivorRatio=2 -XX:PermSize=16m -XX:MaxPermSize=64m -Xss256k -XX:-UseAdaptiveSizePolicy -XX:MaxTenuringThreshold=15 -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError"
fi

JAVA_OPTS=" $JAVA_OPTS -Xloggc:${LOG_PATH}/gc.log -XX:HeapDumpPath=LOGS_DIR=${LOG_PATH} "
JAVA_OPTS=" $JAVA_OPTS -Dapp.name=${SERVICE_NAME} -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai"

## set classpath lib
for i in $base/lib/*;
    do CLASSPATH=$i:"$CLASSPATH";
done
CLASSPATH="$base:$base/conf:$CLASSPATH";

cd $bin_abs_path
echo JAVA_OPTS :$JAVA_OPTS
$JAVA $JAVA_OPTS $JAVA_DEBUG_OPT  -classpath .:$CLASSPATH com.sunhaojie.sbdit.Application