code: public static String toISO8601(Date date){
          DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.US);
          dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
          return dateFormat.format(date);
      }
docs: Formats a Date as an ISO-8601 string representation.
  @param date Date to format
  @return The date formatted as ISO-8601 string