sonarqubesonarqube-4.5sonarqube-ops

SonarQube: is it possible to change the time zone in the JVM parameters?


I have a machine that runs several different servers and it's in a specific time zone in Central Europe.

I need to run SonarQube (4.5.7) in UTC time.

I uncommented the following line in web/WEB-INF/config/environment.rb and restarted SonarQube but the server still shows the original time zone on the System Info page.

config.time_zone = 'UTC'

Should that be enough to change the time zone in SonarQube? Because that didn't really work.

Is there a way I can pass the user.timezone property to the JVM by editing the wrapper.conf file? Looks like it could work but it doesn't look like I'm supposed to touch that file.

Thanks.


Solution

  • Internal files, including web/**/*, must not be touched.

    To change JVM timezone, you should edit conf/sonar.properties and add the value -Duser.timezone=Europe/Sofia to properties sonar.web.javaAdditionalOpts, sonar.ce.javaAdditionalOpts and sonar.search.javaAdditionalOpts.