why does my alarm go off straight away? (android)
<p>Trying to set alarms for certain days of the week, but currently puzzled as to why this alarm is getting fired immediately, no matter what I pass in as hr and min... (I know the day of the week stuff is wrong, just haven't got to that yet!)</p>

<pre><code>public void setReminder(int hr, int min, int day)
{
     Intent intent = new Intent(mContext, AlarmReceiver.class);

     PendingIntent sender = PendingIntent.getBroadcast(mContext, alarmId, intent, PendingIntent.FLAG_UPDATE_CURRENT);

     Calendar calendar = Calendar.getInstance();
     calendar.set(Calendar.HOUR_OF_DAY, hr);
     calendar.set(Calendar.MINUTE, min);
     calendar.set(Calendar.SECOND, 0);
     calendar.setFirstDayOfWeek(Calendar.SUNDAY);
     calendar.set(Calendar.DAY_OF_WEEK, day);


     // set the alarm to repeat every week at the same time
     mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY * 7, sender);
}
</code></pre>

<p>any ideas?  </p>
