Configuring Tomcat timezone

Tomcat defaults to the GMT timezone. If you want to change it you need to add the following code to $TOMCAT_HOME/bin/setenv.sh (or $TOMCAT_HOME/bin/setenv.bat if you're on Windows) using your time zone:

CATALINA_OPTS="-Duser.timezone=Asia/Hong_Kong"

For the list of usable timezone names and more information, see the time zone list.

Table of contents [ Hide Show ]