开发者

How can I change default timezone in Liferay Portal 5.2+

I'm having an issue using Lifera开发者_JAVA百科y Portal Community 5.2.3 according to timezones and time offsets. In windows, it seems to work correctly (GMT+2 Madrid picked auto), but when I install in Linux server, timezone gets stuck to UTC (GMT).

I've no system-ext.properties, so default is UTC, but then... how it works on Windows?

In administration->system properties I get UTC for timezone on both installations

What am I doing wrong?

And another question. If i set timezone to GMT+2 (CEST), what happens when daylight saving is "removed" (CET)?¿ Do I have to specify timezone as "Europe/Madrid" or as "GMT+2"? Does it change automatically?

Thanks in advance!

Tomás García


You need to pass that as a system property when starting Liferay.

Assuming you are using the Tomcat bundle, check out the file bin\setenv.bat on Windows or bin/setenv.sh on Linux.

The Liferay default package contains the parameter

-Duser.timezone=GMT

in the set JAVA_OPTS line.

Just change that to the your timezone, e.g.

-Duser.timezone=Europe/Madrid

Europe/Madrid will correctly deal with DST if I'm not mistaken.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜