Tried following code to do timezone conversion and failed to get correct results. Tried "CDT", "CST", "PDT" and "PST", etc. Please help.
public static
String ConvertTmz(String timeFormat, String timeStr, String tmz){
String theTimeFormat="MM/dd/yyyy HH:mm:ss";
if (timeFormat!=null) theTimeFormat=timeFormat;
SimpleDateFormat sdf = new SimpleDateFormat(theTimeFormat);
sdf.setTimeZone(TimeZone.getTimeZone(tmz));
GetTimeStr(timeStr);
GregorianCalendar time=new GregorianCalendar(yyyy, mm-1, dd, hh, mi, ss);
return sdf.format(time.getTime());
}