Q:

Get difference from current GMT time until 9PM gmt

I'm running a task every minute, i want to print out the difference between the current GMT time and 9PM GMT, i want this to run all the time so once it hits 9PM gmt it'll then reset to 24 hours so its looking for 9PM gmt the next day. 
I have the jodatime libary installed
I have tried, this gets the current GMT time? 
TimeZone gmtTimeZone = TimeZone.getTimeZone("GMT");
        TimeZone.setDefault(gmtTimeZone);
        Calendar calendar = Calendar.getInstance(gmtTimeZone);

now to get 9 oclock i can get the hour? 
if(calendar.get(Calendar. HOUR_OF_DAY); == 9) {

so my question is how do i get from now to 9PM gmt?  and format it nicely IE; 16 Hours, 15 minutes and 4 seconds? 
Thankyou. 

A:

Using Joda-Time, you can get time until 9 PM GMT using the following helper method:
import org.joda.time. DateTimeZone;
import org.joda.time. LocalTime;
import org.joda.time. Period;
import org.joda.time.format. PeriodFormat;

public static String timeUntil(int hourOfDay, int minuteOfHour) {
    Period period = Period.fieldDifference(LocalTime.now(DateTimeZone. UTC),
                                           new LocalTime(hourOfDay, minuteOfHour))
                          .plusHours(24).normalizedStandard().withDays(0).withMillis(0);
    StringBuffer buf = new StringBuffer();
    PeriodFormat.wordBased(Locale. US).printTo(buf, period);
    return buf.toString();
}

Test
System.out.println(timeUntil(21, 0)); // until 9 pm GMT
System.out.println(timeUntil(22, 0)); // until 10 pm GMT

Sample Output
23 hours, 31 minutes and 48 seconds
31 minutes and 48 seconds

