Forums de discussion
How to change the default timezone
suresh midde, modifié il y a 15 années.
How to change the default timezone
Junior Member Publications: 47 Date d'inscription: 03/12/08 Publications récentes
Hi,
I am trying to generate the current time as a id to a particular field to my database.Suppose my table 'Z' should have an id like 'yyyymmddhhss' format,But when I generate the id like this, always it is pointed towards GMT, but I want it to be according to my local timezone.
Hope I am clear in explaining my situation.
Can anyone help me,
Regards
Suresh Midde
I am trying to generate the current time as a id to a particular field to my database.Suppose my table 'Z' should have an id like 'yyyymmddhhss' format,But when I generate the id like this, always it is pointed towards GMT, but I want it to be according to my local timezone.
Hope I am clear in explaining my situation.
Can anyone help me,
Regards
Suresh Midde
Minhchau Dang, modifié il y a 15 années.
RE: How to change the default timezone
Liferay Master Publications: 598 Date d'inscription: 22/10/07 Publications récentes
Set user.timezone in system-ext.properties to a value reflecting your current time zone.
suresh midde, modifié il y a 15 années.
RE: How to change the default timezone
Junior Member Publications: 47 Date d'inscription: 03/12/08 Publications récentes
Hi,
I have tried changing
user.timezone=GMT+05:30
in system-ext.properties, but it is not getting reflected. Still it is pointing to GMT time.
I have system-ext.properties under root/web-inf/classes
I think this file is not getting loaded, as referring to the document, in the following link,
http://docs.liferay.com/portal/4.2/official/liferay-customization-guide-4.2/multipage/ch01s03.html
3. system.properties
The system.properties file is provided as a convenient way to set all properties for the JVM machine and related system settings. Start your application server with the system property system.properties.load set to true to load it. When the server starts, the portal will load system.properties and then system-ext.properties.
Start your application server with the system property system.properties.final set to true if the properties of system.properties override all similar command line properties. If set to false, the properties of system.properties will be set if and only if those properties are not currently set.
Some application servers require you to set the file.encoding and user.timezone on startup regardless of system.properties because the application server reads these properties before system.properties is ever loaded.
Do I need to explicitly tell my tomcat to load system-ext.properties
Help me in this regard
Suresh Midde
I have tried changing
user.timezone=GMT+05:30
in system-ext.properties, but it is not getting reflected. Still it is pointing to GMT time.
I have system-ext.properties under root/web-inf/classes
I think this file is not getting loaded, as referring to the document, in the following link,
http://docs.liferay.com/portal/4.2/official/liferay-customization-guide-4.2/multipage/ch01s03.html
3. system.properties
The system.properties file is provided as a convenient way to set all properties for the JVM machine and related system settings. Start your application server with the system property system.properties.load set to true to load it. When the server starts, the portal will load system.properties and then system-ext.properties.
Start your application server with the system property system.properties.final set to true if the properties of system.properties override all similar command line properties. If set to false, the properties of system.properties will be set if and only if those properties are not currently set.
Some application servers require you to set the file.encoding and user.timezone on startup regardless of system.properties because the application server reads these properties before system.properties is ever loaded.
Do I need to explicitly tell my tomcat to load system-ext.properties
Help me in this regard
Suresh Midde
Victor Zorin, modifié il y a 15 années.
RE: How to change the default timezone
Liferay Legend Publications: 1228 Date d'inscription: 14/04/08 Publications récentes
Check that your startup sh or bat file does not contain jvm setting of -Duser.timezone=GMT for JAVA_OPTS
kamalkant rajput, modifié il y a 15 années.
RE: How to change the default timezone
Expert Publications: 266 Date d'inscription: 10/04/08 Publications récentes
If you want to set Indian Time zone you can use setenv file and put the property
-Duser.timezone=IST
-Duser.timezone=IST
joseph rocks jo, modifié il y a 15 années.
RE: How to change the default timezone
New Member Envoyer: 1 Date d'inscription: 31/03/09 Publications récentes
u can also check www.timezoneguide.com
Konrad Kraszy, modifié il y a 14 années.
RE: How to change the default timezone
New Member Envoyer: 1 Date d'inscription: 10/07/09 Publications récentes
I'm using:
user.timezone=Europe/Paris
in system-ext.properties
user.timezone=Europe/Paris
in system-ext.properties
Pravin Pawar, modifié il y a 14 années.
RE: How to change the default timezone
Junior Member Publications: 62 Date d'inscription: 17/11/09 Publications récentes
Finally I got the solution for setting timezone.
I have set timezone in system-ext.properties file as
but still time will be shown as UTC timezone.
After that I have added timezone in setenv.bat file as
Now it will take the IST timezone.
KK rajput:
If you want to set Indian Time zone you can use setenv file and put the property
-Duser.timezone=IST
I have set timezone in system-ext.properties file as
user.timezone=Asia/Calcutta
but still time will be shown as UTC timezone.
After that I have added timezone in setenv.bat file as
-Duser.timezone=Asia/Calcutta
Now it will take the IST timezone.
Snehal Wani, modifié il y a 14 années.
RE: How to change the default timezone
New Member Publications: 10 Date d'inscription: 22/10/09 Publications récentes
Hi Pravin,
Thanks for this solution!
I am working on the same issue,........
but the next difficulty is that how TimeZone settings can be generalized ?..........
means , on a portal different users with their respective local time zones set on their m/c ,must be able to get their local time zones only and not the unique setting set in system-ext.properties and setenv.sh............
how can we set this multiple options(or dynamic options as set by user) in system-ext.properties and setenv.sh.........
I am using liferay 5.2.3. ,ubuntu , tomcat 5.5............
Thanks in Advance!
Thanks for this solution!
I am working on the same issue,........
but the next difficulty is that how TimeZone settings can be generalized ?..........
means , on a portal different users with their respective local time zones set on their m/c ,must be able to get their local time zones only and not the unique setting set in system-ext.properties and setenv.sh............
how can we set this multiple options(or dynamic options as set by user) in system-ext.properties and setenv.sh.........
I am using liferay 5.2.3. ,ubuntu , tomcat 5.5............
Thanks in Advance!
Devang Patel, modifié il y a 8 années.
RE: How to change the default timezone
Regular Member Publications: 247 Date d'inscription: 19/01/15 Publications récentes
Hi All,
I have tried all the above solution but it doesn't work.
I want to change Time-Zone for India(IST).
Give me the right solution.
Thank You,
Devang Patel
I have tried all the above solution but it doesn't work.
I want to change Time-Zone for India(IST).
Give me the right solution.
Thank You,
Devang Patel
Harish Kumar, modifié il y a 8 années.
RE: How to change the default timezone
Expert Publications: 483 Date d'inscription: 31/07/10 Publications récentesPravin Pawar:
Finally I got the solution for setting timezone.KK rajput:If you want to set Indian Time zone you can use setenv file and put the property
-Duser.timezone=IST
I have set timezone in system-ext.properties file asuser.timezone=Asia/Calcutta
but still time will be shown as UTC timezone.
After that I have added timezone in setenv.bat file as-Duser.timezone=Asia/Calcutta
Now it will take the IST timezone.
Hi
Asia/Calcutta is now obsolate. you should use Asia/Kolkata.
David H Nebinger, modifié il y a 8 années.
RE: How to change the default timezone
Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
Well, this thread was lying dead for the past 5 years before it was revived...