Android Add 7.5 hours to a specific date
<p>In my Android application, I have 3 spinners for Hour/Minute/ and PM or AM. I'd like to add 7.5 hours in that to get the needed time for the user to sleep. This android application of mine is a calculator of a user's sleep. For example, I'd like to wake up at 7:00 AM. BY 11:15 PM you should now be sleeping. Please give me some directions on how to do this. I'm in dire need of help. Thanks. Appreciate your help.</p>

<p>like this: </p>

<pre><code>  /**
   * Get sleeping times corresponding to a local time
   * 
   * @param wakingTime
   *            time to wake up !
   * @return list of times one should go to bed to
   */

  public static Set&lt;Date&gt; getSleepingTimes(Date wakingTime) {

    Set&lt;Date&gt; result = new TreeSet&lt;Date&gt;();
    Calendar calendar = Calendar.getInstance();
    calendar.setTime( wakingTime );
    calendar.add( Calendar.MINUTE, -14 );
    calendar.add( Calendar.MINUTE, -( 2 * 90 ) );
    for ( int i = 3; i &lt;= 6; i++ ) {
      calendar.add( Calendar.MINUTE, -90 );
      result.add( calendar.getTime() );
    }
    return result;

  } // end of getSleepingTimes method
</code></pre>
