File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Locale specific Time to display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Locale specific Time to display" Watch "Locale specific Time to display" New topic
Author

Locale specific Time to display

saivenu madhav
Greenhorn

Joined: Nov 15, 2007
Posts: 29
Hi
I am using struts 1.2 and message resources , I want a typical requirement that time to be displayed according to the locale.

In data base we will have GMT so depending on this display local time according to the locale.

Could anyone suggest one approach.. It would be great if the change in jsp or javascript level. because i have so many places we need to take care this.

ThanksInadvance
Madhav
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
Use the javascript date object. Here is an example if myForm contains a getTimestamp that returns a timestamp in milliseconds.

It will display the time based on the user's time zone.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Locale specific Time to display
 
Similar Threads
Including html files outside the tomcat webapps directory
Can anyone please tell how can we change the locale for the display tag dynamically.
how to change a date in desired format
How to get date format according to the Locale of user
how to set the locale for display tag