Liferay/Tomcat Bundle – Changing Timezone

If you are getting warning messages from your freshly unzipped liferay/tomcat bundle like this:

Warning: META-INF\MANIFEST.MF modified in the future.
Warning: WEB-INF\liferay-display.xml modified in the future.
Warning: WEB-INF\liferay-plugin-package.properties modified in the future.
Warning: WEB-INF\liferay-plugin-package.xml modified in the future.
Warning: index.zul modified in the future.

you have to add timezone settings in the setenv.sh/setenv.bat like that:

-Duser.timezone=Europe/BERLIN

A list of Java Timezones can be found here.

sources:
http://tinyurl.com/lrpbdu
http://tinyurl.com/nd8w5e

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

2 Comments »

 
  • mcahornsirup says:

    That is funny. Even when I explicitly try to get the german time/timezone like this:

    Calendar calendar = Calendar.getInstance(Locale.GERMANY);

    SimpleDateFormat sdf = new SimpleDateFormat(“HH:mm:ss’Z'”);
    System.out.println(“ISO8601 TIME: ” + sdf.format(calendar.getTime()));

    It does not work like expected on Ubuntu, and OSX.

    But it seems to work, when using Glassfish.

    My second approach was to use Liferays Controlpanel to set the portal time – but even this does not change the time/timezone.

    Somehow, this seems to be wrong to me. Now, I’am trying like the way explained. THANKS. And by the way, Europe/Berlin works for me, too 😉

  • Puj says:

    It doesn’t work in Linux (Debian)

    I get the error:
    -Duser.timezone=Europe/BERLIN: No such file or directory

    Cheers.