That’s the expected behaviour of Alarmmanager.
The solution is to check, before creating the alarm, whether the time is earlier than the current time and, if yes, to add a day.
To facilitate "accounts" we will use the class Calendar:
//Cria um Calendar para a hora do alarme
Calendar horaAlarme = Calendar.getInstance();
//Seta a hora do alarme
horaAlarme.set(Calendar.HOUR_OF_DAY, 12);
//Seta os minutos do alarme
horaAlarme.set(Calendar.MINUTE, 20);
//Coloca zero nos segundos
horaAlarme.set(Calendar.SECOND, 0);
//Cria um Calendar com a data/hora actual
Calendar horaActual = Calendar.getInstance();
//Adiciona um dia caso a hora actual for superior à do alarme(12:20)
if(horaActual.getTimeInMillis() >= horaAlarme.getTimeInMillis()){
horaAlarme.add(Calendar.DAY_OF_MONTH, 1);
}
//Agenda o Alarme
alarme.setRepeating(AlarmManager.RTC_WAKEUP,
horaAlarme.getTimeInMillis(),
AlarmManager.INTERVAL_DAY,
alarmIntent);