title: Notification not showing up at correct date
body: <p>I'm trying to create a reminder app that creates notifications for the user at a later/specific date.  I'm using an <code>AlarmManager</code> with a <code>PendingIntent</code> in order to achieve this.  The problem I keep getting is that when I try to specify the date to fire for <code>AlarmManager</code>, it doesn't fire at the scheduled date.  I tried putting in a regular value, such as 8000, and the notification fires immediately.  However, when I try adding the value as a date, the <code>BroadcaseReceiver</code> doesn't receive the <code>Intent</code>.  Below is my code.</p>
  
  <pre><code>    public void setReminderNotification (Context context) {
  
      alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
  
  
      notificationReceiverIntent = new Intent(context, AlarmReceiver.class);
      notificationReceiverIntent.putExtra("Title", itemName);
      notificationReceiverIntent.putExtra("DueDate", dueDateString);
  
  
      Calendar calendar = Calendar.getInstance();
      calendar.setTimeInMillis(System.currentTimeMillis());
      calendar.clear();
      calendar.set(Calendar.MONTH, 6);
      calendar.set(Calendar.YEAR, 2013);
      calendar.set(Calendar.DAY_OF_MONTH, 13);
  
      calendar.set(Calendar.HOUR_OF_DAY, 20);
      calendar.set(Calendar.MINUTE, 48);
      calendar.set(Calendar.SECOND, 0);
      calendar.set(Calendar.AM_PM,Calendar.PM);
  
  
  
      notificationReceiverPendingIntent = PendingIntent.getBroadcast(context, var, notificationReceiverIntent, 0);
      alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
              AlarmManager.INTERVAL_DAY, notificationReceiverPendingIntent);
  
  }
  </code></pre>
  
  <p>So the main problem is seems to be this line.  </p>
  
  <p><code>alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
                  AlarmManager.INTERVAL_DAY, notificationReceiverPendingIntent);</code></p>
  
  <p>I expect the notification to fire off immediately since the target date is set to the past.  However, the notification doesn't appear immediately.  When I replace the <code>calendar.getTimeinMillis()</code> variable with something like 8000, the notification does appear immediately.  Any ideas why?</p>