File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Locale specific Time to display

saivenu madhav

Joined: Nov 15, 2007
Posts: 29
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.

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:
subject: Locale specific Time to display
It's not a secret anymore!