Running in a Ubuntu 16.04, Tomcat7 and Java7_OpenJDK, I can see that in my catalina.out
log, all events are shown with the incorrect time. The difference is -1 hour from what it is set on the system.
Trying to be sure that timezone is correctly set for java, I have tried to explicitly set the timezone in setenv.sh
file, using CATALINA_OPTS
, as follows:
export CATALINA_OPTS="$CATALINA_OPTS -Duser.timezone=Europe/Madrid"
When I restart the tomcat service (by using service tomcat7 restart
), if I make a
ps -aux | grep tomcat7
I can see that new tomcat7 process is running using the specified '-Duser.timezone'. But anything changes on my 'catalina.out'.
The strange thing, is that if I set in setenv.sh
:
export CATALINA_OPTS="$CATALINA_OPTS -Duser.timezone=America/Chicago"
After restarting the service, catalina.out
is already showing the same -1 hour from my real time...
So, where is supposed that I have to set or change the timezone to be used by catalina.out
?