Hi All,

I have a Database where each record has timestamp like '16-AUG-12 PM' which is GMT time.
Now I am writing Java program to display this information tot he user. I want to convert this date time in Local time zone instead of GMT.

I have following code to get date time from DB
Java Code:
Date transferDate = rs.getTimestamp("Date");
I have utility class to convert this date in readable format:
Java Code:
public static String ezReadFormat (Date d){
        SimpleDateFormat timestampFormatter = new SimpleDateFormat ("MMM dd, yyyy hh:mm:ss a");
        System.out.println("Input Date: " + d);
        System.out.println("Time Zone: " + Calendar.getInstance().getTimeZone().getDisplayName());
        String date = timestampFormatter.format(d);
        System.out.println("Converted Date: " + date);
        return date;
But I am getting following output:
Java Code:
Input Date: 2012-08-16 20:12:41.996
Time Zone: Eastern Standard Time
Converted Date: Aug 17, 2012 12:12:41 AM
Can anyone suggest what I am doing wrong or what will be easy way to solve this?