Calendar Conversion between Different TimeZones in Java
<p>I want to convert the calendar object between two time zones in java.I shall the pass the first calendar object and want the output to be the modified calendar object with the different timezone.</p>

<p>Can someone provide me a way on how to do it ?</p>

<p>This is what i have done ...</p>

<pre><code>DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
GregorianCalendar pst = new GregorianCalendar();
GregorianCalendar est = new GregorianCalendar();
pst.setTime(maintWindow);
int year = pst.get(Calendar.YEAR);
int month = pst.get(Calendar.MONTH);
int day = pst.get(Calendar.DAY_OF_MONTH);
format.setTimeZone(timeZone);
pst.set(year, month, day, hour, min);
Date date = pst.getTime();
logger.info(date);
logger.info(format.format(date));
logger.info(pst.getTime());
est.setTimeInMillis(date.getTime());
logger.info(est.getTime());
</code></pre>
