I solved a similar problem of mine as follows
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int day = cal.get(Calendar.DAY_OF_MONTH);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int min = cal.get(Calendar.MINUTE);
datePicker.updateDate(year, month, day);
timePicker.setCurrentHour(hour);
timePicker.setCurrentMinute(min);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…