code: public static void setTime(Calendar cal, Date time)
     {
        if (time != null)
        {
           Calendar startCalendar = popCalendar(time);
           cal.set(Calendar.HOUR_OF_DAY, startCalendar.get(Calendar.HOUR_OF_DAY));
           cal.set(Calendar.MINUTE, startCalendar.get(Calendar.MINUTE));
           cal.set(Calendar.SECOND, startCalendar.get(Calendar.SECOND));
           pushCalendar(startCalendar);
        }
     }
docs: Given a date represented by a Calendar instance, set the time
  component of the date based on the hours and minutes of the
  time supplied by the Date instance.
  
  @param cal Calendar instance representing the date
  @param time Date instance representing the time of day