Q:

How can I change default timezone in Liferay Portal 5.2+

I'm having an issue using Liferay 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

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.

