import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

public class Main {
	public static void main(String[] args) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("y-M-d'T'H:m:sXXX", Locale.ENGLISH);
		Date date = sdf.parse("2011-11-22T00:00:00-06:00");
		// Display in default format i.e. the value of date#toString
		System.out.println(date);

		// #################Display in custom format and timezone#################
		// At timezone offset of -06:00 hours
		sdf.setTimeZone(TimeZone.getTimeZone("GMT-06:00"));
		System.out.println(sdf.format(date));
		
		// In UTC
		sdf.setTimeZone(TimeZone.getTimeZone("Etc/UTC"));
		System.out.println(sdf.format(date));

		// In New York
		sdf.setTimeZone(TimeZone.getTimeZone("America/New_York"));
		System.out.println(sdf.format(date));
	}
}