我想在特定的日期和时间设置闹钟。我正在使用 webservice 获取我的日期和时间。我已经解析并拆分了日期和时间并使用了 SimpleDateFormat,现在我想将此日期和时间放在 [alarmManager.set(AlarmManager.RTC_WAKEUP,dt,pendingIntent);] 但我的闹钟在给定时间不起作用
String str_date= hr+":"+min+":"+sec+" "+dat+"/"+mon+"/"+year;
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");
ParsePosition position = new ParsePosition(0);
java.util.Date stringToDate = sdf.parse(str_date, position);
dt = stringToDate.getDate();
请帮助提前谢谢