This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Date Localization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Date Localization" Watch "Date Localization" New topic

Date Localization

Viral Thakkar
Ranch Hand

Joined: Jan 30, 2001
Posts: 33
Hi All,

I have a java.util.Date object. I want to convert this Date object as per the user locale.

How to do this.?

pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
this might help:


Viral Thakkar
Ranch Hand

Joined: Jan 30, 2001
Posts: 33
Hi All,

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.

Date in database : 19 August 2004 6:30 PM

Date for User from India should be : 19 August 2004 1:00 PM

How to achieve this .???

Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Take a look at the getInstance() methods in the Calendar class or the constructors of GregorianCalendar. I'm pretty sure you'll find what you want there.

I agree. Here's the link:
subject: Date Localization
It's not a secret anymore!