code: private static String getTimeForApi (Date dt) {
          Calendar calendar = new GregorianCalendar();
          TimeZone timeZone = calendar.getTimeZone();
          Calendar cal = Calendar.getInstance(timeZone);
          cal.setTime(dt);
          return String.format("%tFT%<tRZ", cal);
      }
docs: Format date the way Github api wants
  @param dt
  @return String