Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
Vaneet Sharma
Time Zone Setting
November 11, 2008 11:50 AM
Answer

Vaneet Sharma

Rank: Regular Member

Posts: 195

Join Date: July 25, 2008

Recent Posts

How to set the Time Zone settings for LR ?

Actually if i change the Time Zone setting through Enterprise Admin portlet , and when i restart the server, the Time Zone Settings are gone and it defaults to UTC- 11.00.

How can i persist Time Zone settings
na na
RE: Time Zone Setting
November 11, 2008 7:05 PM
Answer

na na

Rank: Junior Member

Posts: 94

Join Date: April 29, 2008

Recent Posts

Because liferay switch to use UTC instead of GMT already so you might need to switch your startup script to use UTC as well and your user table to use UTC as well.
Vaneet Sharma
RE: Time Zone Setting
November 11, 2008 10:06 PM
Answer

Vaneet Sharma

Rank: Regular Member

Posts: 195

Join Date: July 25, 2008

Recent Posts

na na:
Because liferay switch to use UTC instead of GMT already so you might need to switch your startup script to use UTC as well and your user table to use UTC as well.


Is there a simple way by which i can define the Time Settings for the entire Portal.

My user table has GMT value in TimeZONEID(column) .
Tobias Amon
RE: Time Zone Setting
November 11, 2008 11:19 PM
Answer

Tobias Amon

Rank: Liferay Master

Posts: 549

Join Date: August 8, 2007

Recent Posts

Hi,

create the file system-ext.properties in WEB-INF/classes folder. Add the key/value "user.timezone=GMT".

kind regards
Tobias
Vaneet Sharma
RE: Time Zone Setting
November 19, 2008 9:05 AM
Answer

Vaneet Sharma

Rank: Regular Member

Posts: 195

Join Date: July 25, 2008

Recent Posts

create the file system-ext.properties in WEB-INF/classes folder. Add the key/value "user.timezone=GMT".


I tried this also, but nothing happened.
Any other way by which i can set this.

Thanks
Luca Costa
RE: Time Zone Setting
November 19, 2008 9:56 AM
Answer

Luca Costa

Rank: Junior Member

Posts: 72

Join Date: March 5, 2008

Recent Posts

Not only time zone but also language wal lost between reboots...

There was a bug in liferay, this was patched, but the change was lost in old versions:
See this post

http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1139763

And this patch

http://issues.liferay.com/browse/LEP-6978

Luca
Vaneet Sharma
RE: Time Zone Setting
November 19, 2008 10:08 AM
Answer

Vaneet Sharma

Rank: Regular Member

Posts: 195

Join Date: July 25, 2008

Recent Posts

If i am not wrong i need to make changes in CompanyLocalServiceImpl.java only .
Luca Costa
RE: Time Zone Setting
November 19, 2008 10:22 AM
Answer

Luca Costa

Rank: Junior Member

Posts: 72

Join Date: March 5, 2008

Recent Posts

Yes, that patch works sure for 5.1.

If you dont want to change ext, (when I test 5.1.2 I had same problem)
you can update tables on the database... for the default user.
Simply create another user, change language and time zone,
update "default" user and restart portal. et voila!
Vaneet Sharma
RE: Time Zone Settingrks with LR 5.1.2
November 19, 2008 11:02 AM
Answer

Vaneet Sharma

Rank: Regular Member

Posts: 195

Join Date: July 25, 2008

Recent Posts

Does patch not works with 5.1.2. ?

If i follow the second approach as suggested by you.

I need to create a new user and change the setting then how can i update the default user (test). ?

Also if i have other users as well, then how can i change the settings for them also ?

Thanks
Luca Costa
RE: Time Zone Settingrks with LR 5.1.2
November 19, 2008 11:45 PM
Answer

Luca Costa

Rank: Junior Member

Posts: 72

Join Date: March 5, 2008

Recent Posts

Dont know if works with 5.1.2.



Create a new user and change the settings,
in database watch new values
and then update default user

example


update user_
set languageId='it_IT', timezoneId ='Europe/Paris'
where defaultUser=1
and companyId=10110 --<<<< set your companyId


new user created will gain default user values.
for other user you can identify them by emailaddress for example or update the whole table.

-- ALL USERS WARNING!!!
update user_
set languageId='it_IT', timezoneId ='Europe/Paris'