change timezone in tomcat

In this article we will discuss how to change the time zone of the tomcat java application.

By default tomcat comes with the following setting in tomcat.conf:

wrapper.use_system_time=FALSE

This will configure the java to run using the same timezone configured in within the application declaration.
By changing wrapper.use_system_time=FALSE to

wrapper.use_system_time=TRUE


we can force the tomcat to use the same timezone configured on the server side.

If we want to configure a custom timezone for the java, apart from the system (let's say we want logging in different timezone) we keep the previous setting to false the following parameters can be defined in the tomcat.conf file 

wrapper.java.additional.4=-Duser.timezone=Europe/Belfast



The location of the tomcat.conf file is usually at this location /etc/tomcatX/tomcat.conf

Make sure you restart your tomcat service after any change made to tomcat.conf file.

  • timezone, tomcat, change
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

 Catalina cache warnings: Unable to add the resource to the cache

IssueApache Tomcat logs, e.g. logs/catalina.out continuously report: Unable to add the resource...

 How to find the correct Java Heap Settings for your Server

By default Tomcat is configured to use a minimum of 64 MB of RAM and a maximum of 128 MB of RAM...

 Tomcat Native library which allows optimal performance in production environments was not found

In the default tomcat deployment, you may see this error in regard to missing tomcat native...

 Tomcat SSL without keystore

Starting from tomcat8 we can configure the tomcat SSL protocol without the need of a keystore.It...

 Importing an SSL certificate into the keystore

In this short tutorial we will present how to import a pem certificate into a pfx and then into a...