permaculture playing cards*
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
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.

 
Don't get me started about those stupid light bulbs.
 
subject: Locale specific Time to display