Here you can find the source of getCalenderWithHour(int hours)
public static Calendar getCalenderWithHour(int hours)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.TimeZone; public class Main { public static Calendar getCalenderWithHour(int hours) { Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); cal.add(Calendar.HOUR, hours); return cal; }/*from ww w .j a va 2 s . co m*/ }