public static Calendar createCalendarMidnight(final Date date){
  Calendar cal=new GregorianCalendar(getTimeZone("GMT+0"));
  cal.setTime(date);
  cal.set(HOUR_OF_DAY,0);
  cal.set(MINUTE,0);
  cal.set(SECOND,0);
  cal.set(MILLISECOND,0);
  return cal;
}

public static Calendar createCalendarMidnight ( final Date date ) { Calendar cal = new GregorianCalendar ( getTimeZone ( "GMT+0" ) ) ; cal . setTime ( date ) ; cal . set ( HOUR_OF_DAY , 0 ) ; cal . set ( MINUTE , 0 ) ; cal . set ( SECOND , 0 ) ; cal . set ( MILLISECOND , 0 ) ; return cal ; }
creates a calendar with hour , minute , second , millisecond set to zero for given date .
