Here you can find the source of getCalendarInUTC(String date)
public static Calendar getCalendarInUTC(String date) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.TimeZone; public class Main { public static Calendar getCalendarInUTC(String date) throws ParseException { Calendar calendar = Calendar.getInstance(TimeZone .getTimeZone("UTC")); SimpleDateFormat fromDateFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss"); calendar.setTime(fromDateFormat.parse(date)); return calendar; }/*from w ww. j a v a2 s .c o m*/ }