How do I set the timezone in Tomcat for a single web app?

前端 未结 8 2016
春和景丽
春和景丽 2021-02-05 13:00

What is the best way to set the time zone in Tomcat for a single web app? I\'ve seen options for changing the command-line parameters or environment variables for Tomcat, but is

8条回答
  •  甜味超标
    2021-02-05 13:30

    Set the system variable to CATALINA_OPTS=-Duser.timezone=America/Denver

    You can also specify the CATALINA_OPTS in the $TOMCAT_HOME/bin/catalina.sh or %TOMCAT_HOME%\bin\catalina.bat file as well.

    Here's a list of acceptable timezones.

    Source

提交回复
热议问题