Hi Viral,

> I have a Date stored in GMT format in database. Now I need to display
> this date to user depending on his/her LOCALE. I found SimpleDateFormat
> and few other classes to convert the Date Format, but I am not able to
> find how to change the Date value as per user locale.
> 
> Example:
> Date in database : 19 August 2004 6:30 PM
> 
> Date for User from India should be :  19 August 2004 1:00 PM
What you need is not a java.util.Locale, but a java.util.TimeZone.  As
for that, I have no information that you can acquire the client's
TimeZone via the Servlet API.  I can think of two solutions at the
moment:
1. map users to time zones
2. map locales to time zones

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <[EMAIL PROTECTED], [EMAIL PROTECTED]>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to