code: public static Date setHours(Date d, int hours) {
         Calendar cal = Calendar.getInstance();
         cal.setTime(d);
         cal.set(Calendar.HOUR_OF_DAY, hours);
         return cal.getTime();
     }
docs: Set hours to a date
  
  @param d date
  @param hours hours
  @return new date