Here you can find the source of getDateTimeUTC(int year, int month, int day, int hour, int minute, int second)
private static Calendar getDateTimeUTC(int year, int month, int day, int hour, int minute, int second)
//package com.java2s; import java.util.Calendar; import java.util.TimeZone; public class Main { private static Calendar getDateTimeUTC(int year, int month, int day, int hour, int minute, int second) { Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); cal.clear();//from w w w. ja v a 2s . co m cal.set(year, month, day, hour, minute, second); return cal; } }