Forums de discussion

How to change Time Zone in Liferay 6.2 GA4

thumbnail
Devang Patel, modifié il y a 8 années.

How to change Time Zone in Liferay 6.2 GA4

Regular Member Publications: 247 Date d'inscription: 19/01/15 Publications récentes
Hi All,

I am using Liferay 6.2 GA4.
I want to change my default time zone to Indian Time Zone.
I have tried this :
1:- Change Time-Zone from portal setting->Display Settings
2:- Add properties (user.timezone=Asia/Calcutta) to portal-ext.properties file.
3:- setenv file and put the property (-Duser.timezone=IST)
But It didn't work.

Thank You,
Devang Patel
thumbnail
David H Nebinger, modifié il y a 8 années.

RE: How to change Time Zone in Liferay 6.2 GA4

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
you really shouldn't do this, IMHO, Devang.

Let Liferay store times in GMT and users set their display timezone where it needs to be.

The problem comes if you are in a different time zone, if the DB is storing things in IST it has to convert between two timezones, often a two step calc to convert to GMT then to desired timezone, and this can often be an expensive calculation when doing in mass.
thumbnail
Devang Patel, modifié il y a 8 années.

RE: How to change Time Zone in Liferay 6.2 GA4

Regular Member Publications: 247 Date d'inscription: 19/01/15 Publications récentes
Hi David,
Thanks.

I know what you are saying but there is a requirement so.
Thank You,
Devang Patel
thumbnail
Arun Das, modifié il y a 8 années.

RE: How to change Time Zone in Liferay 6.2 GA4

Regular Member Publications: 166 Date d'inscription: 23/07/12 Publications récentes
Hi,
I don't think there is a property named user.timezone. Change it to time.zones=Asia/Calcutta and restart the portal. And as like David told let Liferay store time in GMT

Arun
thumbnail
Olaf Kock, modifié il y a 8 années.

RE: How to change Time Zone in Liferay 6.2 GA4

Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
Read the requirement again. My assumption is that the requirement is about what's shown on the UI, not what's saved in the database or what the server runs on.

Dealing with different timezones technically (e.g. with storage etc) is *always* a mess, thus you *want* to avoid it at all costs. When dates get displayed to the user: Transform however you like. When they're stored in the database, or used in logfiles: Go with UTC (not even GMT, but that's nitpicking)

You'll save yourself *a lot* of future work when you synchronize log files with database entries and crossreference all the different information you find in the portal with the same timezone that *never* has any daylight saving time, etc.(that's UTC).
thumbnail
Devang Patel, modifié il y a 8 années.

RE: How to change Time Zone in Liferay 6.2 GA4

Regular Member Publications: 247 Date d'inscription: 19/01/15 Publications récentes
Hi olaf,Arun

Thanks for valuable information.

Thank You,
Devang Patel
thumbnail
Kiran Yalavali, modifié il y a 8 années.

RE: How to change Time Zone in Liferay 6.2 GA4

Regular Member Publications: 175 Date d'inscription: 15/10/14 Publications récentes
Hi Devang,

I'm facing the same issue but this problem was solved in your side pls share me how to change time zone in liferay

Please heml me.

Thanks,
Kiran.
thumbnail
Olaf Kock, modifié il y a 8 années.

RE: How to change Time Zone in Liferay 6.2 GA4

Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
What from the answers that were given did you try already? Where do you want to set the timezone? You can configure each individual user's timezone as well as the default timezone for the users. Or the default timezone of the portal - these settings should be quite obvious.