title: Setting Alarm on 9 AM GMT
body: <p>I'm having a strange problem. I need to set a task to run exactly at 9 AM GMT. Here's the code I'm using:</p>
  
  <pre><code>AlarmManager mgr = (AlarmManager) context
              .getSystemService(Context.ALARM_SERVICE);
  Calendar calendar = Calendar.getInstance(TimeZone
                      .getTimeZone("GMT"));
              calendar.setTimeInMillis(System.currentTimeMillis());
              calendar.set(Calendar.HOUR, 9);
              calendar.set(Calendar.MINUTE, 0);
  
              mgr.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pi);
  </code></pre>
  
  <p>My timezone is GMT+2. As a test I've tried to set alarm at this time:</p>
  
  <pre><code>Alarm time = My time - 2 hours + couple of minutes to catch the alarm
  </code></pre>
  
  <p>But it never worked. Am I missing something? Thanks in advance.</p>