Here you can find the source of getUTCDate(int year, int month, int day)
public static Date getUTCDate(int year, int month, int day)
//package com.java2s; /*//from w w w. ja v a2 s . c o m Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved See License.txt in the project root for license information. */ import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; public class Main { public static Date getUTCDate(int year, int month, int day) { return getUTCDate(year, month, day, 0, 0, 0); } public static Date getUTCDate(int year, int month, int day, int hour, int minute, int second) { GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("utc")); int dateMonth = month - 1; calendar.set(year, dateMonth, day, hour, minute, second); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); } }