Foros de discusión
reg:Time zone
Resma sr, modificado hace 10 años.
reg:Time zone
Junior Member Mensajes: 55 Fecha de incorporación: 10/09/13 Mensajes recientes
Hi all,
In my portlet I want the modified date and time in view page. The date is correct but time is not correct. How can I fix it.
Anybody please help...
In my portlet I want the modified date and time in view page. The date is correct but time is not correct. How can I fix it.
Anybody please help...
Zsolt Balogh, modificado hace 10 años.
RE: reg:Time zone
Expert Mensajes: 463 Fecha de incorporación: 23/03/09 Mensajes recientes
Hi Resma,
I guess the problem is that the times are in not the correct timezone. Liferay stores the time in the server's timezone (most of the time it's set to GMT) and you would need to convert the time to a different timezone. The timezone might affect the date as well so I recommend you to use the conversion on both.
Zsolt
I guess the problem is that the times are in not the correct timezone. Liferay stores the time in the server's timezone (most of the time it's set to GMT) and you would need to convert the time to a different timezone. The timezone might affect the date as well so I recommend you to use the conversion on both.
Zsolt
Resma sr, modificado hace 10 años.
RE: reg:Time zone
Junior Member Mensajes: 55 Fecha de incorporación: 10/09/13 Mensajes recientesZsolt Balogh:
Hi Resma,
I guess the problem is that the times are in not the correct timezone. Liferay stores the time in the server's timezone (most of the time it's set to GMT) and you would need to convert the time to a different timezone. The timezone might affect the date as well so I recommend you to use the conversion on both.
Zsolt
Hi Zsolt Balogh,
Thanks for your reply. But I changed the time zone in display settings in control panel and also tried changing in the stenev.bat file, system.properties etc...But no changes found.
Please suggest me any other way I can achieve it.
David H Nebinger, modificado hace 10 años.
RE: reg:Time zone
Liferay Legend Mensajes: 14914 Fecha de incorporación: 2/09/06 Mensajes recientes
So by default Liferay starts up in GMT. It stores dates/times in GMT in the database.
When you are ready to format a date for display, you need to access the current user and pull their TZ value. This is assigned to your SimpleDateFormat guy to have it create the date/time string in the TZ for the user.
When you are ready to format a date for display, you need to access the current user and pull their TZ value. This is assigned to your SimpleDateFormat guy to have it create the date/time string in the TZ for the user.