In java I need to make a Calendar object from a String in the format:
yyyy-MM-dd\'T\'HH:mm:ss
This string will always be set as GMT time. S
Here is some code that could help you out with setting the timzones before parsing them:
// sdf contains a Calendar object with the default timezone.
Date date = new Date();
String formatPattern = ....;
SimpleDateFormat sdf = new SimpleDateFormat(formatPattern);
TimeZone T1;
TimeZone T2;
....
....
// set the Calendar of sdf to timezone T1
sdf.setTimeZone(T1);
System.out.println(sdf.format(date));
// set the Calendar of sdf to timezone T2
sdf.setTimeZone(T2);
System.out.println(sdf.format(date));
// Use the 'calOfT2' instance-methods to get specific info
// about the time-of-day for date 'date' in timezone T2.
Calendar calOfT2 = sdf.getCalendar();
another similar question I found might help too: How to set default time zone in Java and control the way date are stored on DB?
EDIT:
Here is a great tutorial on Java & Dates too: http://www.tutorialspoint.com/java/java_date_time.htm