public static void setTime ( Calendar calendar , int hourOfDay , int minute , int second , int millisecond ) { calendar . set ( Calendar . HOUR_OF_DAY , hourOfDay ) ; calendar . set ( Calendar . MINUTE , minute ) ; calendar . set ( Calendar . SECOND , second ) ; calendar . set ( Calendar . MILLISECOND , millisecond ) ; }
Sets hour minutes seconds and milliseconds to the given values . Leaves date info untouched .