This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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.

 
 
subject: Locale specific Time to display
 
Similar Threads
How to get date format according to the Locale of user
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 set the locale for display tag